| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Otherwise it would do in-place changes to it. Fixes gh-3279.
|
|\
| |
| | |
Cleanup subscript rebased
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The first error types were changed to ValueError (or introduced)
newly. Python seems to normally use IndexError or TypeError here,
so changing back to IndexError.
The second is just a clarification to say when the error actually
occurs for the user.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This function causes a crash otherwise, because it loops over the number
of dimensions to construct sub-iterators. If the number of dimensions is
zero, the sub-iterators will not be initialized, causing problems later on.
|
| |
| |
| |
| | |
Oops..
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes indexing with NumPy boolean scalar values, which caused
crashes before. Both Python and NumPy boolean scalars now behave the
same. This contains a few small changes to PyArrayMapIterNew, where
the PyArrayMapIterObject is memset to zero and a fix for the crash,
which was caused by _nonzero_indices, which did not initialize any
iterators because ndim is zero for scalars. *IterNew will now check
for scalars before running that part of the code.
|
| | |
|
| |
| |
| |
| |
| | |
Conflicts:
numpy/core/src/multiarray/mapping.c
|
| |
| |
| |
| |
| | |
Conflicts:
numpy/core/src/multiarray/mapping.c
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Conflicts:
numpy/core/src/multiarray/mapping.c
|
| | |
|
| |
| |
| |
| |
| | |
Conflicts:
numpy/core/src/multiarray/mapping.c
|
| |
| |
| |
| |
| | |
Conflicts:
numpy/core/src/multiarray/mapping.c
|
| | |
|
| |
| |
| |
| |
| | |
Conflicts:
numpy/core/src/multiarray/mapping.c
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
array_subscript_nice to array_subscript
Conflicts:
numpy/core/src/multiarray/mapping.c
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Conflicts:
numpy/core/src/multiarray/mapping.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rename array_big_item to array_item_asarray and move special case
for array_item_nice into array_item_asscalar. Also remove redundant
PyArray_Return and rename array_item_nice to array_item.
Conflicts:
numpy/core/src/multiarray/mapping.c
|
|\ \
| | |
| | | |
Fix for issue 3192
|
|/ /
| |
| |
| | |
python versions
|
|\ \
| | |
| | | |
2to3: Skip `funcattrs` fixer.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Python 3 the func.func_name attribute is replaced by the
func.__name__ attribute. The only file affected by this is
doc/sphinxext/numpydoc/phantom_import.py, and there its use
is already version dependent.
Closes #3054.
|
|\ \ \
| |/ /
|/| | |
ENH: delete and insert generalization and speed improvements
|
| | |
| | |
| | |
| | |
| | |
| | | |
np.delete abuses range to calculate start/stop/step and len. This
would create potentially large intermediates if it was a list, so
for numpy/lib/function_base.py and python < 3, use range = xrange.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were several smaller to larger problems for these two functions,
that this addresses:
* delete did not handle out of bound values graciously (ignoring negative
ones)
* both were unnecessarily slow due to use of sets
* insert did not handle unsorted indices correctly
Further changes:
* Add FutureWarning for boolean obj, so it can be handled similar to a
boolean mask with indexing.
* Add FutureWarning to remove inconsistent special cases for 0-d arrays
(neither insertion nor deletion along an axis make sense for a scalar)
* Allow insertion of an array with more then one element along axis when
obj is a sequence with a single item. (i.e. array([1])).
* Reintroduce speed optimization for scalar in insert that existed in 1.6.
|
|\ \
| |/
|/| |
2to3: Skip buffer fixer.
|
|/
|
|
|
|
|
|
|
|
| |
The buffer object is replaced by memoryview in Python >= 3. The memory
view object has also been backported to Python 2.7. However, the only
use of `buffer1/1memoryview1 is in `numpy/core/tests/test_unicode.py`
and there it is already version dependent: `memoryview` is used if the
Python version is >= 3 and `buffer` is used otherwise.
Closes #3043.
|
|\
| |
| | |
2to3: Skip `future` fixer.
|
|/
|
|
|
|
| |
The `future` fixer removes the `from __future__ import ...` statements.
That is fine for Python 3, but we need to keep that statement if we are
shooting for a common code base for both Python 2 and Python 3.
|
|\
| |
| | |
2to3: Apply `map` fixer.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Python 3 `map` is an iterator while in Python 2 it returns a list.
The simple fix applied by the fixer is to inclose all instances of map
with `list(...)`. This is not needed in all cases, and even where
appropriate list comprehensions may be preferred for their clarity.
Consequently, this patch attempts to use list comprehensions where it
makes sense.
When the mapped function has two arguments there is another problem that
can arise. In Python 3 map stops execution when the shortest argument
list is exhausted, while in Python 2 it stops when the longest argument
list is exhausted. Consequently the two argument case might need special
care. However, we have been running Python3 converted versions of numpy
since 1.5 without problems, so it is probably not something that affects
us.
Closes #3068
|
|\ \
| | |
| | | |
ENH: add `inverse` parameter to numpy.in1d().
|
|/ / |
|
|\ \
| |/
|/| |
DOC: point to the github issues page
|
| |
| |
| |
| |
| | |
* Trac no longer used
* Openining "new issue" on GitHub
|