| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \
| |/ / /
|/| | | |
MAINT: cleanups to _iotools.StringConverter
|
| | | |
| | | |
| | | |
| | | | |
The previous logic here was very hard to follow, as loop variables were being used after the loop ended, and being conditionally overwritten.
|
| | | | |
|
| | | | |
|
| |/ /
| | |
| | |
| | | |
Also fix the docstring indentation
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(#16129)
* Improved one of the error messages for histogramdd.py as outlined in issue #15984
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
| | | |
|
|\ \ \
| |_|/
|/| | |
BUG: lib: Fix a problem with vectorize with default parameters.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added a note to some of the tests that the order of the calls is an
important part of the test, because the code is testing the caching
of the ufuncs.
Also reuse a couple functions in the vectorize tests by defining them at
the module level.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\
| |
| | |
ENH: Fix exception causes in four .py files
|
| |
| |
| | |
Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>
|
| |
| |
| | |
Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
|/
|
| |
Add missing closing brackets, script to generate the list in the PR gh-16051.
|
|
|
| |
Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>
|
|\
| |
| | |
TST: Add slow_pypy support
|
| | |
|
|/ |
|
|
|
| |
Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>>
|
|\
| |
| | |
MAINT: Remove duplicated code in iotools.py
|
| | |
|
| |
| |
| | |
* Run test_large_zip in a child process
|
|\ \
| | |
| | | |
DEP: Deprecate ndarray.tostring()
|
| |/
| |
| |
| | |
The corresponding `array.array.tostring()` in the standard library has been deprecated in favor of `tobytes` since Python 3.1 (python/cpython@1ce3eb5c5b4830e69b21865e2d723e22749544e0).
|
| | |
|
| |
| |
| |
| |
| | |
* "bandwidth" -> "bin width"
* Minor grammatical fixes
|
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
TST: Remove code that is not supposed to warn out of warning assertion
|
| | | |
|
|\ \ \
| |/ /
| | | |
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])
```
|
|\ \
| | |
| | | |
DEP: Forbid passing non-integral index arrays to `insert` and `delete`
|
| |/
| |
| |
| | |
This expires a deprecation warning from back in 1.9.
|
|\ \
| |/
| | |
MAINT: Cleanups to np.insert and np.delete
|
| |
| |
| |
| | |
No behavior change here unless someone implements a subclass where `arr.ravel().ndim == 0`, which no sane person would do anyway.
|
| | |
|
| | |
|
| | |
|
|/
|
| |
* BUG, TST: fix f2py for PyPy, skip one test for PyPy, xfail tests for s390x
|
|
|
|
|
|
|
| |
`global` is only needed if a variable appears on the left of an assignment.
These variables do not.
Most suffer from the misconception that `var[x] = y` requires `var` to be global, but it does not.
|
| |
|
|
|
|
|
|
|
| |
Tweak a few lines so that arrays with an axis with length 0
don't break the np.unique code.
Closes gh-15559.
|
|
|
|
|
| |
This code is from github user huonw, from this PR:
https://github.com/numpy/numpy/pull/15565
|
|
|
|
|
| |
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
|
|\
| |
| | |
DEP: Do not allow "abstract" dtype conversion/creation
|