| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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,))
|
| | | |
|
| |/ |
|
|\ \
| |/
|/| |
ENH: Allow 0-d indexes in np.take
|
| |
| |
| |
| |
| |
| |
| | |
The TakeFrom already supported this. This removes the check which
made it not possible and adds some tests for take.
Also add documentation and information to the release notes.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The issue was that the string value of scalar floating types equal to -0.0
lacked a trailing ".0".
>>> print np.float64(-0.0)
-0
The problem resulted from using val < 0 to check for a leading negative
sign. That expression evaluates false when val = -0.0, and the need to
append ".0" was not detected.
|
|\ \
| | |
| | | |
BUG: Fix segfault in np.result_type for None input.
|
| | |
| | |
| | |
| | |
| | | |
Makes behavior identical to np.dtype(None), which fits to how
the function works.
|
|/ / |
|
|\ \
| | |
| | | |
Remove scons support
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These references were in MANIFEST.in, doc/summarize.py, release.sh, and
numpy/testing/noseclasses.py and involved scons files that have been
removed, mostly setupscons.py and setupsconsegg.py that were in the top
level.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This removes files and code supporting scons builds. After this change
numpy will only support builds using distutils or bento. The removal of
scons has been discussed on the list several times and a decision has been
made that scons support is no longer needed. This was originally discussed
for numpy 1.7 and because the distutils and bento methods are still
available we are skipping the usual deprecation period.
|
|\ \ \
| | | |
| | | | |
Fix for #2895 ndindex failing
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix ndindex for 0-d arrays.
Add tests for tuple arguments to ndindex
|