summaryrefslogtreecommitdiff
path: root/numpy/lib/shape_base.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC: Unify cross-references between array joining methodsTim Hoffmann2020-05-101-3/+5
|
* Update numpy/lib/shape_base.pyKerem Hallaç2020-04-251-1/+3
| | | Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>
* ENH: Fix exception causes in four .py fileskeremh2020-04-241-2/+2
|
* DOC: fix documentation for apply_along_axis (#15619)Heshy Roskes2020-02-201-2/+2
|
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* ENH,DEP: Allow multiple axes in expand_dims (#14051)Larry Bradley2019-12-021-26/+41
| | | | | | | | | This PR allows the axis keyword in expand_dims to be a tuple of ints. Previously, axis could only be an int. This issue was previously discussed in gh-12290 and the changes are based on gh-12290 (comment). This PR also removes the deprecation added in v1.13 (2017-05-17), where previously axis could be outside of the range (-a.ndim - 1) <= axis <= a.ndim. Such an axis value will now raise an AxisError. Please let me know if it's too soon to remove this deprecation (I could not find any dev docs stating the length of the numpy deprecation cycle). Closes gh-12290.
* Mention that split() returns views into the original arrayFelix Divo2019-09-161-4/+3
| | | Also adds a minor code change
* MAINT: speed up [hvd]stack by eliminating list comprehension. (#13697)Marten van Kerkwijk2019-06-011-1/+4
|
* MAINT: Fixes tests with __array_function__ disabledStephan Hoyer2019-05-261-1/+9
|
* Fixed minor doc error in take_along_axisJavier Dehesa2019-05-211-1/+1
| | | Fixes #13598
* BUG: Increment stacklevel for warnings to account for NEP-18 overrides (#13589)Stephan Hoyer2019-05-201-1/+1
| | | | | | | | | | | | | | * Increment stacklevel for warnings to account for NEP-18 overrides For NumPy functions that make use of `__array_function__`, the appropriate the stack level for warnings should generally be increased by 1 to account for the override function defined in numpy.core.overrides. Fixes GH-13329 * Update numpy/lib/type_check.py Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
* Make wording changes according to @mattipBharat123rox2019-05-161-2/+1
|
* DOC: Mention that expand_dims returns a viewBharat123rox2019-05-161-1/+1
|
* ENH: __array_function__ updates for NumPy 1.17.0Stephan Hoyer2019-01-221-4/+1
| | | | | | | | | | - Always enable __array_function__ overrides. - Remove special cases for Python 2 compatibility. - Document these changes in 1.17.0-notes.rst. It will be good to see ASV numbers to understand the performance implications of these changes. If need be, we can speed up NumPy functions internally by using non-dispatched functions (with ``.__wrapped__``).
* TST, DOC: enable refguide_checkTyler Reddy2018-12-141-88/+82
| | | | | | | | * ported the refguide_check module from SciPy for usage in NumPy docstring execution/ verification; added the refguide_check run to Azure Mac OS CI * adjusted NumPy docstrings such that refguide_check passes
* MAINT: more fixes for disabling overridesStephan Hoyer2018-11-101-1/+4
|
* DEP: deprecate passing a generator to stack functionsStephan Hoyer2018-10-271-2/+3
| | | | | | Fixes gh-12263 We can't support generators with dispatch for ``__array_function__``.
* MAINT: set preferred __module__ for numpy functionsStephan Hoyer2018-10-231-1/+6
|
* ENH: __array_function__ support for np.lib, part 2/2 (#12119)Stephan Hoyer2018-10-221-2/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: __array_function__ support for np.lib, part 2 xref GH12028 np.lib.npyio through np.lib.ufunclike * Fix failures in numpy/core/tests/test_overrides.py * CLN: handle depreaction in dispatchers for np.lib.ufunclike * CLN: fewer dispatchers in lib.twodim_base * CLN: fewer dispatchers in lib.shape_base * CLN: more dispatcher consolidation * BUG: fix test failure * Use all method instead of function in assert_equal * DOC: indicate n is array_like in scimath.logn * MAINT: updates per review * MAINT: more conservative changes in assert_array_equal * MAINT: add back in comment * MAINT: casting tweaks in assert_array_equal * MAINT: fixes and tests for assert_array_equal on subclasses
* BUG: fix array_split incorrect behavior with array size bigger MAX_INT32 ↵Nikita Titov2018-08-261-2/+2
| | | | | | | | | | | | (#11813) Fixes #11809. * BUG: fix array_split incorrect behavior with array size bigger MAX_INT32 * TST: added test for array_split with array size greater MAX_INT32 * addressed review comments
* ENH: Make expand_dims work on subclassesEric Wieser2018-07-291-1/+5
| | | | This allows np.ma.expand_dims to be removed
* ENH: Add (put|take)_along_axis as described in #8708Eric Wieser2018-05-251-1/+226
| | | | This is the reduced version that does not allow any insertion of extra dimensions
* DOC: Add missing np. prefix to expand_dims docs (#10109)Hidehiro NAGAOKA2017-11-281-3/+3
|
* Merge pull request #9946 from eric-wieser/improve-take-docsAllan Haldane2017-11-281-5/+23
|\ | | | | DOC: describe the expansion of take and apply_along_axis in detail
| * DOC: describe the expansion of take and apply_along_axis in detailEric Wieser2017-11-211-5/+23
| | | | | | | | | | | | Extracted from gh-8714 [ci-skip]
* | DOC: v/h/dstack docstr shouldn't imply deprecationAllan Haldane2017-11-211-15/+11
|/ | | | [ci skip]
* Clarify docstring for numpy.array_splitDavid Linke2017-10-281-1/+7
| | | Before this addition, people could expect that only the last sub-array would have a different size. The added documentation and example make clear what the function really does.
* MAINT: Remove unused isscalar importEric Wieser2017-10-211-1/+1
|
* DOC: Fixed doctest of apply along axis with 3D returnMichael Seifert2017-09-061-2/+0
| | | | [skip ci]
* DEP: Deprecate incorrect behavior of expand_dims.Charles Harris2017-05-171-3/+18
| | | | | | | | | | | Expand_dims works as documented when the index of the inserted NewAxis in the resulting array satisfies -a.ndim - 1 <= index <= a.ndim. However, when index > a.ndim index is replaced by a.ndim and, when index < -a.ndim - 1, it is replaced by index + a.ndim + 1, which may be negative and results in incorrect placement. The latter two cases are now deprecated. Closes #9100.
* DOC: link to stack from column_stackEric Wieser2017-05-131-1/+1
| | | | [ci skip]
* ENH: Spelling fixesVille Skyttä2017-05-091-1/+1
|
* Merge pull request #8643 from eric-wieser/fix-8642Eric Wieser2017-04-111-1/+3
|\ | | | | BUG: Fix double-wrapping of object scalars
| * BUG: Fix double-wrapping of object scalarsEric Wieser2017-04-061-1/+3
| | | | | | | | Fixes #8642
* | Merge pull request #8737 from eric-wieser/squeeze-expand-docsCharles Harris2017-04-011-0/+2
|\ \ | | | | | | DOC: Mention that expand_dims and squeeze are inverses
| * | DOC: expand_dims and squeeze are inversesEric Wieser2017-03-061-0/+2
| | | | | | | | | | | | [ci skip]
* | | DOC: Spell out note for `dstack`Søren Fuglede Jørgensen2017-03-261-1/+2
|/ / | | | | This adds to the documentation on `dstack` the notes from `hstack` and `vstack` about dimensionality requirements.
* | MAINT: replace len(x.shape) with x.ndimEric Wieser2017-02-241-5/+5
| |
* | MAINT: Use normalize_axis_index in all python axis checkingEric Wieser2017-02-201-6/+3
|/ | | | | | | As a result, some exceptions change from ValueError to IndexError This also changes the exception types raised in places where normalize_axis_index is not quite appropriate
* BUG: Don't leak internal exceptions when given an empty arrayEric Wieser2017-02-131-1/+4
| | | | Fixes #7454
* MAINT: Improve error-checking of axis argumentEric Wieser2017-02-111-3/+2
| | | | Copied from the implementation in core.shape_base.stack
* MAINT: Transpose the result, rather than working with a transposed viewEric Wieser2017-02-111-23/+34
| | | | | | | .transpose does not specify that it must return a view, so subclasses (like np.ma.array) could otherwise break this. This exposes some more need for matrix special casing.
* BUG: Work around evil matrix.__array_prepare__Eric Wieser2017-02-111-1/+6
|
* BUG: Call __array_prepare__ before __array_wrap__Eric Wieser2017-02-111-1/+4
|
* MAINT: Use np.ndindex, which seems just as efficientEric Wieser2017-02-111-18/+8
|
* BUG: Fix crash on 0d return value in apply_along_axisEric Wieser2017-02-111-58/+63
| | | | | | Also: ENH: Support arbitrary dimensionality of return value MAINT: remove special casing
* BUG: Fix apply_along_axis() for when func1d() returns a non-ndarray (#8426)Ben Rowland2016-12-311-1/+1
| | | | | | | | | | | | * BUG: Closes issue #8419 Fixes issue in apply_along_axis() where func1d() returns a non ndarray * BUG: Fix apply_along_axis() when func1d() returns a non-ndarray Closes issue #8419. Fixes issue in apply_along_axis() where func1d() returns a non ndarray by calling asanyarray() on result. This commit fixes a too long line in the test case.
* ENH: allow numpy.apply_along_axis() to work with ndarray subclasses (#7918)Ben Rowland2016-10-111-3/+7
| | | | | | | This commit modifies the numpy.apply_along_axis() function so that if it is called with an ndarray subclass, the internal func1d calls receive subclass instances and the overall function returns an instance of the subclass. There are two new tests for these two behaviours.
* DOC: apply_along_axis missing whitespace inserted before colonMichael Seifert2016-02-181-1/+1
| | | | | The missing whitespace lead to inconsistent rendering in the online documentation. [ci skip]
* DOC: rewrite stack/concatenate reference in h/v/dstackAuke Wiggers2016-02-161-2/+2
|