| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Replaces the
raise Exception, msg:
form with
raise Exception(msg):
|
|\
| |
| | |
2to3: Apply `sys_exc` fixes. Closes #3086.
|
| |
| |
| |
| |
| | |
This uses sys.exc_info in place of sys.exc_value. The new function
goes back to at least 2002, so should be safe.
|
|\ \
| | |
| | | |
DOC -- add another paragraph note to ndarray.view docs
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
More detail: Views are only sensitive to under-the-hood storage when
the dtype storage size has changed.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since most numpy operations are not sensitive to underlying data
structure (C-ordered arrays vs fortran-ordered arrays, versus slices or
transposes of arrays, etc.), but structured-array views ARE sensitive to
that, it is worth saying it explicitly in the documentation.
|
|\ \ \
| | | |
| | | | |
BUG: gh-2687 make multiarray dot method accept out array and keyword args
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Use PyUnicode_FromString instead.
|
| | | |
| | | |
| | | |
| | | | |
and make added comments in test_multiarray.py helpful.
|
| | | |
| | | |
| | | |
| | | | |
args.
|
|\ \ \ \
| | | | |
| | | | | |
2to3: Fix callable.
|
| | |_|/
| |/| | |
|
|\ \ \ \
| | | | |
| | | | | |
2to3: Apply `funcattrs` fixer. Closes #3058.
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
This replaces the `b.func_xxxx` with newer `__xxxx__` attribute names
For example, `f.__name__` replaces `f.func_name`
|
|/ / /
| | |
| | |
| | | |
This changes the `exec` command to the `exec` function.
|
|\ \ \
| | | |
| | | | |
BUG: Fix strides of trailing 1s when reshaping
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When adding ones to the shape for non contiguous arrays reshapes
(i.e. either the first array is not contiguous or the the reshape
order does not match it). The strides of trailing ones were not
set. For example reshape of (6,) to (6,1,1). Previously this occured
rarely because of removed special handleing when only ones were
added or removed.
|
|\ \ \ \
| | | | |
| | | | | |
BUG: npy-pkg-config ini files were missing after Bento build.
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
2to3: Change use 'has_key' to 'key in'.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Part of the 2to3 project.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
2to3: Use modern exception syntax.
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
Example: except ValueError,msg: -> except ValueError as msg:
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
BUG: Incref items in np.take on error as they are decrefed later
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
These did no checking for this special case. And thus, wrap would go
into infinite loops trying to adjust the index, and clip would (probably)
segfault. This raises IndexError explicitely beforehand.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Also make the testcase for take a class.
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When take fails during copying due to out of bound indices, then the already
copied items will be decref'd on array destruction. To avoid that, as well
as possible overlapping or already initialized object arrays, decref and
incref during the copy operation itself. Note that all basic types but
object use their own fasttake, so this does not change anything for them.
|
| | | | |
| | | | |
| | | | |
| | | | | |
functions.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
BUG: Fix regression of bad error/random behavior in item method
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
Appearently .item() for arrays with size != 1 correctly returned an error
in 1.6., but failed to raise the error (due to missing return) in 1.7.
|
|/ / / /
| | | |
| | | | |
fix percentile docstring
|
|\ \ \ \
| | | | |
| | | | | |
Fix some large array sorts and memory error handling
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
PyDataMem_NEW was not checked for error and the occurance of
errors not returned correctly in new_sort. Also for PyArray_LexSort
and new_argsort it should now raise MemoryError correctly.
This is done by setting PyErr_NoMemory() when no error is already
present, as the low level sorting can only fail for this reason.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | | |
Some of the iteration variables were int, causing sorts to fail for large
arrays. Fixes github issue 427.
|
|\ \ \ \
| | | | |
| | | | | |
BUG: Make nansum work with booleans.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This broke when function_base._nannop tried to fill a boolean array with
integer zeros, raising a 'safe_casting' error. It looks like nanargmax and
nanargmin would also break, and were probably incorrect for booleans in any
case. The fix is not to use fill values for boolean and integer dtypes.
Previously that was only done for the integer dtypes.
|
|\ \ \ \
| | | | |
| | | | | |
ENH: Use tp_basicsize, not NPY_SIZEOF_PYARRAYOBJECT, for allocation
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
This change allows C-API level subtypes of PyArray_Type without forcing the
developer to rewrite the tp_alloc function and only change the amount of
memory allocated.
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
PyArray_LexSort was allocating memory to hold actual PyArrayObject's
and PyArrayIterObject's, but only storing pointers to such objects
in the array.
|
|\ \ \
| | | |
| | | | |
Fix complex polynomial fit
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of
if lhs.dtype.char in np.typecodes['Complex']:
use
if issubclass(lhs.dtype.type, np.complexfloating):
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The test uses the complex set of sample points [1, 1j, -1, -1j] whose
squared sum is exactly zero. This would fail before the column scaling
was fixed.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The columns should be scaled using their 2-norm, but in the complex case
that was being incorrectly computed as the square root of the sum of the
squared elements rather than as the square root of the sum of their squared
real and imaginary parts.
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
Fix some inconsistencies in the example. The library is loaded as '_lib' not
'lib' in the rest of the example. Also, the function is called 'foo_func' not
'foo'
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
BUG: Fix logic in ndindex to match __init__ method. Fixes bug in ndindex((3,))
|
| | | |
|