| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
As discussed in
https://mail.python.org/archives/list/numpy-discussion@python.org/thread/UKZJACAP5FUG7KP2AQDPE4P5ADNWLOHZ/
This flag was always meant to be temporary, and cleaning it up is
long overdue.
|
|
|
|
|
|
|
|
|
| |
The `__array_function__` API currently will exhaust iterators so we
cannot accept sequences reasonably. Checking for `__getitem__` is presumably
enough to reject that (and was what the deprecation used).
Future changes could allow this again, although it is not a useful API
anyway, since we have to materialize the iterable in any case.
|
| |
|
| |
|
| |
|
|
|
|
| |
* Changed product computing logic for kron to use broadcasting
|
|
|
|
|
|
| |
* Replace `*` call with `multiply`
* Handle `mat` cases to perform reshape
* Remove use result wrapping to maintain consistency with ufuncs
|
|
|
|
| |
Input such as matrix will cause a `ValueError` due to dim restrictions
|
| |
|
| |
|
|
|
|
|
|
| |
* `np.kron` uses `np.concatenate` which fails when shape is 0 along an
axis
* Refactor shape normalising portion.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The array creation functions have the most to gain:
1. np.asarray is 4 times faster and commonly used.
2. Other functions are wrapped using __array_function__ in Python
making it more difficult
This commit (unfortunatly) has to do a few things:
* Modify __array_function__ C-side dispatching to accomodate
the fastcall argument convention.
* Move asarray, etc. to C after removing all "fast paths" from
np.array (simplifying the code)
* Fixup imports, since asarray was imported directly in a few places
* Replace some places where `np.array` was probably used for speed
instead of np.asarray or similar. (or by accident in 1 or 2 places)
|
| |
|
|
|
|
|
|
| |
Numpydoc parses parameter different depending on whether there is a space
before the colon, for it to be properly interpreted as names and types;
spaces need to be put on each side.
|
|
|
|
|
|
| |
Some part of the docstring were between simple backticks which are
therefore marked as cross-reference, while I belive the intended role is
likely verbatim.
|
|
|
|
| |
This edit is relation to issue gh-15986.
Chained exception in shape_base.py
|
|
|
| |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|
|
| |
DOC: fixes to capitalization and header lines
|
| |
|
|
|
| |
Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
| |
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Also adds a minor code change
|
| |
|
| |
|
|
|
| |
Fixes #13598
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- 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__``).
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
| |
Fixes gh-12263
We can't support generators with dispatch for ``__array_function__``.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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
|
|
|
|
| |
This allows np.ma.expand_dims to be removed
|
|
|
|
| |
This is the reduced version that does not allow any insertion of extra dimensions
|
| |
|
|\
| |
| | |
DOC: describe the expansion of take and apply_along_axis in detail
|
| |
| |
| |
| |
| |
| | |
Extracted from gh-8714
[ci-skip]
|
|/
|
|
| |
[ci skip]
|
|
|
| |
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.
|
| |
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
[ci skip]
|