| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Added a benchmark for `trim_zeros()`
* Improve the performance of `np.trim_zeros()`
* Increase the variety of the tests
Fall back to the old `np.trim_zeros()` implementation if an exception is encountered.
Emit a `DeprecationWarning` in such case.
* DEP,REL: Added a deprecation release note
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
ENH: added edge keyword argument to digitize
added test
|
|/ /
| |
| |
| |
| |
| |
| | |
(#16811)
* DOC: update parameter choices for asarray, asarray_contiguous, asarray_chkfinite converters
Co-authored-by: sun <sun@vosdbt.org>
|
|/ |
|
|\
| |
| | |
BUG: Order percentile monotonically
|
| |
| |
| | |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* DOC: Fixes for 18 broken links
This, with PR #16465, should fix nearly all the remaining broken links
on the site. 4 or 5 others should be easy to fix and just
need attention from someone more knowledgeable -- will
open an issue. For release notes with dead links,
I could usually find links on archive.org for roughly contemporary
versions.
* DOC: Update to "Fixes for 18 broken links #16472"
* Obsolete links, previously commented out, now deleted:
https://github.com/numpy/numpy/pull/16472#discussion_r433928958
* Semantic markup for reference to Python class:
https://github.com/numpy/numpy/pull/16472#discussion_r433553928
* Missing :ref: in internal link:
https://github.com/numpy/numpy/pull/16472#discussion_r433554484
Not included: Resolution on using external/internal doc link in .py:
https://github.com/numpy/numpy/pull/16472#discussion_r433554824
* DOC: Add internal link for 'Fixes for 18 broken links' PR #16472
Making reference [1] an internal link in function_base.py => numpy.vectorize.html
* DOC: Redirect 2 link fixes in PR #16472
* governance.rst link reverted
* ununcs.rst `overridden` link goes where it was meant to
per https://github.com/numpy/numpy/pull/16472#pullrequestreview-424666070
|
| |
| |
| |
| | |
Minor cleanup while looking at something else.
|
|/
|
|
| |
Addresses gh-13457
|
|\
| |
| |
| |
| | |
LSchroefl/link_SciPy_multidimensional_interpolation
DOC: link np.interp to SciPy's interpolation functions (closes #14154)
|
| |
| |
| | |
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
|\ \
| | |
| | | |
MAINT: Clean up the implementation of quantile
|
| | |
| | |
| | | |
take now correctly returns `out`, even on 0d arrays
|
| | |
| | |
| | |
| | | |
This also simplifies the axis handling logic, taking advantage of the fact we know `axis` is 0 for the rest of the function body
|
| |/
| |
| |
| | |
This does not affect the behavior in any way
|
|\ \
| |/
|/| |
DEP: Deprecate `numpy.dual`.
|
| |
| |
| |
| |
| |
| | |
Add a deprecation warning in the `numpy.dual` module, and
remove the use of `numpy.dual` from the few places where it
is used in the numpy code.
|
| |
| |
| |
| | |
It's easier to move the relevant axis to position 0 in `ap` first than it is to move it for every relevant object simultaneously.
|
| |
| |
| |
| | |
The `add` ufunc is happy to handle `out=None` by itself
|
|\ \
| | |
| | | |
BUG: lib: Fix a problem with vectorize with default parameters.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When `otypes` is given to `vectorize` and then the instance is
called, it creates a ufunc by calling numpy.core.umath.frompyfunc.
The number of arguments given to this ufunc is set to the number
of arguments in the call of the vectorize instance. This ufunc
is cached, so frompyfunc does not have to be called on the next
call. The problem is that, if the function being wrapped has
parameters with default values, the number of arguments passed
to the vectorize instance can change, and when that happens, a
new ufunc must be created by calling frompyfunc with the correct
number of arguments.
This commit changes the cache of the ufunc from a simple attribute
that holds the most recent ufunc to a dictionary whose keys are
the number of arguments in the call. The cache is only used when
the vectorized function is called with only positional arguments
and there are no excluded arguments. If keywords are used, the
number of arguments is no longer sufficient to uniquely identify a
previously created ufunc.
Closes gh-16120.
|
|/
|
|
|
|
|
|
|
| |
We only do a shallow copy of arrays (mainly important for object arrays), so
mention that in the documentation.
Fixes #15923
Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
| |
types (#15816)
Cleanup from the dropping of python 2
|
|
|
|
|
|
|
|
| |
This expires a deprecation from 1.8.
The corresponding deprecation in `np.insert` has less clear semantics, so has been left to a future patch.
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
|
|\
| |
| | |
DEP: Make `np.insert` and `np.delete` on 0d arrays with an axis an error
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this change, the following code worked:
```
>>> some_0d = np.array(1)
>>> np.insert(some_0d, "some nonsense", 10, axis=0)
array(10)
>>> np.insert(some_0d, "some nonsense", 42, axis="some nonsense")
array(42)
```
Now these raise AxisError and TypeError, respectively.
`delete` is exactly the same.
|
|\ \
| | |
| | | |
DEP: Make np.delete on out-of-bounds indices an error
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note that this only affects lists of indices.
```python
>>> a = np.arange(3)
````
Before:
```python
>>> np.delete(a, 100)
IndexError
>>> np.delete(a, [100])
DeprecationWarning
array([0, 1, 2])
>>> np.delete(a, -1)
array([0, 1])
>>> np.delete(a, [-1])
FutureWarning
array([0, 1, 2])
```
After:
```python
>>> np.delete(a, 100)
IndexError
>>> np.delete(a, [100])
IndexError
>>> np.delete(a, -1)
array([0, 1])
>>> np.delete(a, [-1])
array([0, 1])
```
|
|/
|
|
| |
This expires a deprecation warning from back in 1.9.
|
|
|
|
| |
No behavior change here unless someone implements a subclass where `arr.ravel().ndim == 0`, which no sane person would do anyway.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is largely a re-submission of the original change proposed in #6509. Discussion was hosted in multiple forums including #3474, the numpy mailing list circa 10-2015, and the 02-26-2020 NumPy Triage meeting.
This PR closes #3474 and #15570
|