| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |\
| |
| | |
BUG: Fix file-like object check when saving arrays
|
| | | |
|
| | |
| |
| |
| | |
For writing arrays, only the ``write`` method is necessary.
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| | |
DEP: Speed up WarnOnWrite deprecation in buffer interface
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a buffer interface does not request a writeable buffer,
simply pass a read-only one when the warn on write flag is set.
This is to give an easier way forward with avoiding the deprecation
warnings: Simply do not ask for a writeable buffer.
It will break code that expects writeable buffers but does not
ask for them specifically a bit harder than would be nice.
But since such code probably should ask for it specifically, this
is likely fine (an RC release has to find out).
The main reason for this is, that this way it plays very will with
cython, which requests writeable buffers explicitly and if declared
`const` is happy about read-only (so that using `const` is the best
way to avoid the warning and makes code cleaner).
Closes gh-13929, gh-13974
|
| |/
|
|
|
|
|
|
|
|
| |
For array likes supporting UFuncs, `np.abs` would return an array-like,
and this is currently not compatible with the use of `np.piecewise`.
The simplest fix seems to be to just call asanyarray (which piecewise
calls anyway on the array) beforehand. This way we ensure the conditions
are also an array.
Fixes gh-13894
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the base is not an array (or generally when the flag of the base
array was toggled), it is OK to allow setting the writeable flag to
True, as long as any ancestor (especially the last one) is writeable.
This commit also slightly change the behaviour of the base attribute.
---
* ENH: Deprecate writeable broadcast_array
* ENH: Make writeable flag enabling more reliable for non-array bases
When the base is not an array (or generally when the flag of the base
array was toggled), it is OK to allow setting the writeable flag to
True, as long as any ancestor (especially the last one) is writeable.
* Update doc/release/1.17.0-notes.rst
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
* Update doc/release/1.17.0-notes.rst
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
* Update numpy/lib/tests/test_stride_tricks.py
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
* Update numpy/core/tests/test_multiarray.py
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
* DOC: improve warning (from review)
|
| |\ |
|
| | |
| |
| |
| | |
Now with tests....
|
| | | |
|
| | | |
|
| | |\
| | |
| | | |
MAINT: fix histogram*d dispatchers
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
fixes GH-13728
|
| | |/ |
|
| | |\
| | |
| | | |
DOC: Document/ Deprecate functions exposed in "numpy" namespace
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
All of this code was already correct, this just tidies it a little
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
* DOC, MAINT: Misc. typo fixes
Found via `codespell`
|
| | | | |
|
| |/ / |
|
| | |
| |
| | |
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>
|
| |\ \ |
|
| | |\ \
| | | |
| | | | |
DOC: Mention that expand_dims returns a view
|
| | | | | |
|
| | | | | |
|
| | |\ \ \
| | | | |
| | | | | |
ENH: Allow broadcast to be called with zero arguments
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Follows on from gh-6905 which reduced the limit from 2 to 1. Let's go all the way to zero.
Just as for `broadcast(broadcast(a), b)` is interpreted as `broadcast(a, b)` , this change interprets
`broadcast(broadcast(), a)` as `broadcast(a)`.
|
| | | | | | |
|
| | | | | | |
|
| | |\ \ \ \
| | | |/ /
| | |/| |
| | | | | |
fix-genfromtxt
|
| | | |\ \ \
| | | | | |
| | | | | | |
API: Make MaskedArray.mask return a view, rather than the underlying mask
|
| | | | |/ /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This prevents consumers from reshaping the mask in place, which breaks things
As a result, `x.mask is x.mask` returns `False`, but this was already true of `x.data is x.data`.
May also be related to gh-10270
|
| | | |\ \ \
| | | | | |
| | | | | | |
BUG: Handle subarrays in descr_to_dtype
|
| | | | | | | |
|
| | | | | | | |
|
| | | | |/ / |
|
| | | |\ \ \
| | | | | |
| | | | | | |
ENH: Add 'bitorder' keyword to packbits, unpackbits
|
| | | | | | | |
|