[Numpy-svn] [numpy/numpy] 908e06: ENH: larger fixes for np.delete and np.insert func...
GitHub
noreply at github.com
Thu Apr 11 15:31:26 EDT 2013
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: 908e06c3c465434023649b0ca522836580c5cfdc
https://github.com/numpy/numpy/commit/908e06c3c465434023649b0ca522836580c5cfdc
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-11 (Thu, 11 Apr 2013)
Changed paths:
M doc/release/1.8.0-notes.rst
M numpy/lib/function_base.py
M numpy/lib/tests/test_function_base.py
Log Message:
-----------
ENH: larger fixes for np.delete and np.insert functions
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.
Commit: b3836868e81c04973c7527beb1c32d19d97a8a29
https://github.com/numpy/numpy/commit/b3836868e81c04973c7527beb1c32d19d97a8a29
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-11 (Thu, 11 Apr 2013)
Changed paths:
M numpy/lib/function_base.py
Log Message:
-----------
FIX: insert/delete fixes and warnings for non-integer indices
Commit: f17e55ddefe0e3c730be8220476b1a7ae8dc7a43
https://github.com/numpy/numpy/commit/f17e55ddefe0e3c730be8220476b1a7ae8dc7a43
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-11 (Thu, 11 Apr 2013)
Changed paths:
M numpy/lib/tests/test_function_base.py
Log Message:
-----------
TST: New tests for insert/delete covering warnings and corner cases
Commit: 6d305e49c155b744a699e9d09ca9132ee663018a
https://github.com/numpy/numpy/commit/6d305e49c155b744a699e9d09ca9132ee663018a
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-11 (Thu, 11 Apr 2013)
Changed paths:
M numpy/lib/function_base.py
M numpy/lib/tests/test_function_base.py
Log Message:
-----------
MAINT: np.delete keep old out of bound/negative index behavior
Commit: 0350d5e2194494dc1bd8bb10759557e30980fef0
https://github.com/numpy/numpy/commit/0350d5e2194494dc1bd8bb10759557e30980fef0
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-11 (Thu, 11 Apr 2013)
Changed paths:
M doc/release/1.8.0-notes.rst
Log Message:
-----------
DOC: Fixup of delete/insert changes in release notes
Commit: 1675ad9e5b95605a851337f407e1fad33cf10c9c
https://github.com/numpy/numpy/commit/1675ad9e5b95605a851337f407e1fad33cf10c9c
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-11 (Thu, 11 Apr 2013)
Changed paths:
M numpy/lib/function_base.py
Log Message:
-----------
FIX: rename xrange to range in python 2
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.
Commit: b9232f34bfb53bf7c574bfa350dd981f58d6a2d4
https://github.com/numpy/numpy/commit/b9232f34bfb53bf7c574bfa350dd981f58d6a2d4
Author: njsmith <njs at pobox.com>
Date: 2013-04-11 (Thu, 11 Apr 2013)
Changed paths:
M doc/release/1.8.0-notes.rst
M numpy/lib/function_base.py
M numpy/lib/tests/test_function_base.py
Log Message:
-----------
Merge pull request #452 from seberg/enhdel
ENH: delete and insert generalization and speed improvements
Compare: https://github.com/numpy/numpy/compare/b7053e8d065f...b9232f34bfb5
More information about the Numpy-svn
mailing list