| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These dtypes do not really make sense as instances. We can (somewhat)
reasonably define np.dtype(np.int64) as the default (machine endianess)
int64. (Arguably, it is unclear that `np.array(arr_of_>f8, dtype="f")`
should return arr_of_<f8, but that would be very noisy!)
However, `np.integer` as equivalent to long, is not well defined.
Similarly, `dtype=Decimal` may be neat to spell `dtype=object` when you
intend to put Decimal objects into the array. But it is misleading,
since there is no special meaning to it at this time.
The biggest issue with it, is that `arr.astype(np.floating)` looks
like it will let float32 or float128 pass, but it will force a
float64 output! Arguably downcasting is a bug in this case.
A related issue is `np.dtype("S")` and especially "S0". The dtype "S"
does make sense for most or all places where `dtype=...` can be
passed. However, it is conceptionally different from other dtypes, since
it will not end up being attached to the array (unlike "S2" which
would be). The dtype "S" really means the type number/DType class
of String, and not a specific dtype instance.
|
|\ \
| | |
| | | |
BUG: Fixing result of np quantile edge case
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
Updated the description to consider all array elements
Updated the examples to use multiple elements array, to show that one element not close enough prevent for the whole array to be considered as real
Closes #15626
|
| | |
|
| | |
|
|\ \
| |/
|/| |
MAINT: cleanup unused imports; avoid redefinition of imports
|
| |
| |
| |
| |
| |
| |
| | |
* Cleanup unused imports (F401) of mostly standard Python modules,
or some internal but unlikely referenced modules
* Where internal imports are potentially used, mark with noqa
* Avoid redefinition of imports (F811)
|
|/ |
|
|
|
| |
More sys.version cleanup.
|
|
|
|
|
|
|
| |
The bug occurs since numpy 1.16. Before that empty descr corresponds to
`np.dtype([])`. This fixes the problem by following numpy 1.15's
behavior.
Closes gh-15396
|
|
|
|
|
|
|
|
|
| |
This PR uses simple cases of PEP 380 to rewrite:
for v in g:
yield v
into:
yield from <expr>
|
|\
| |
| | |
ENH: Make use of ExitStack in npyio.py
|
| | |
|
|/ |
|
|\
| |
| | |
MAINT: Replace basestring with str.
|
| |
| |
| |
| |
| |
| |
| | |
This replaces basestring with str except in
- tools/npy_tempita/
- numpy/compat/py3k.py
|
|\ \
| |/
|/| |
MAINT: Revise imports from urllib modules
|
| | |
|
|/ |
|
|\
| |
| | |
MAINT: Cleanup python2 references
|
| | |
|
|\ \
| | |
| | | |
MAINT: Python2 Cleanups
|
| |/ |
|
|/ |
|
|
|
|
| |
This implements NEP 34.
|
| |
|
| |
|
| |
|
|\
| |
| | |
MAINT: cleanup sys.version dependant code
|
| | |
|