| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
API: remove undocumented use of __array__(dtype, context)
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This adds the additional deprecation of fastclip if it is set at
registration time instead of only testing that it is never used.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
MAINT,API: ignore and NULL fasttake/fastputmask ArrFuncs slots
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This removes the use of the fastputmask ArrFuncs slot from within
NumPy and always leaves it NULL.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Always NULL the fasttake slot, and instead move the optimized versions
by doing itemsize specialization in the Take function itself.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
MAINT: Remove sys.version checks in tests
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
DOC: Update ``np.full`` docstring.
|
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Previous document was not properly documenting the case when `fill_value` is an array_like object.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
MAINT: cleanup sys.version dependant code
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* TST: refactor sorter tests, use proper ragged array creation syntax
* MAINT: code never hit the exception, but would error when iterating
* MAINT: pytest.mark.parametrize did not add much, removing (from review)
* MAINT: use asanyarray and generalize (from review)
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
BUG: Add some missing C error handling
|
| | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
BUG: fix NameError in clip nan propagation tests
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The test expects parameters `arr`, `amin` and `amax`. However it then
uses `a`, `amin` and `amax` resulting in a `NameError`. This error was
not caught as the test was marked with xfail.
This commit changes `a` -> `arr` removing the NameError. Further it
adds precautions against similar errors requiring the error to be an
AssertionError and making the test strict.
|
| | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \
| | |/ / / / / / / / /
| |/| | | | | | | | | |
BUG: Use PyDict_GetItemWithError() instead of PyDict_GetItem()
|
| | |_|_|_|/ / / / /
| |/| | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
This means we no longer interpret `MemoryError` or `KeyboardInterrupt` as `keyword arg not provided`, for instance.
This function is python 3 only, hence this was difficult to do in older versions of numpy.
Inspired by https://bugs.python.org/issue35459
|
|/ / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
DOC: Update documentation of np.clip
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
BUG: ensure reduction output matches input along non-reduction axes.
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Previously, things like
`np.add.reduce(np.ones((3, 3)), axis=0, out=np.empty(1))`
worked, even though the output should have shape (3,).
|
|\ \ \ \ \ \ \ \ \ \ \
| |_|_|_|/ / / / / / /
|/| | | | | | | | | | |
MAINT: Eliminate some calls to `eval`
|
| | | | | | | | | | | |
|
| | |_|/ / / / / / /
| |/| | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* The instance in `_internal` is parsing tuples and integers, so `ast.literal_eval` is just fine
* The instance in `crack_fortran` is just trying to lookup a function name dynamically
* The instance in `f90mod_rules` is looking at the result of `capi_maps.getarrdims(...)['rank']`, which is always a string representation of an integer
The f2py code is still littered with `eval`, but the remaining cases were harder to reason about.
|
|\ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
DOC: Changed file extension of ma README.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Get github to render the rST correctly.
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
MAINT: Work with unicode strings in `dtype('i8,i8')`
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Right now, we convert `str` objects to `bytes`, and then work with those.
Since this is a human convenience API, the input really ought to be a string.
A future patch will suggest deprecating `dtype(b'i8,i8')`, but for now it will continue to work.
|
|\ \ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / / /
| | / / / / / / / / /
| |/ / / / / / / / /
|/| | | | | | | | | |
MAINT: Ensure `_convert_from_*` functions set errors
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Previously some of these would return null without setting an error, meaning the caller had to clean up after them.
Removes all direct callers of `PyArray_DescrConverter` in this file, since `_convert_from_any` has less indirection and a simpler calling convention.
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
There's no need to do formatting with `%s` this any more, we can use the `%S` formatting characters to embed the unicode directly.
Also simplifies similar cases using `%R`.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
MAINT: Refactor dtype conversion functions to be more similar
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Before there were three signatures:
* `PyArray_Descr*(...)`
* `PyArray_Descr*(..., int* err_flag)`
* `int(..., PyArray_Descr** ret)`
This unifies them all into `PyArray_Descr*(...)`, and introduces a special singeton to distinguish "error" from "gave up" cases.
Also changes function names for consistency.
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
BUG: Add missing error handling to _convert_from_list
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Previously this function would return null without setting an exception.
Additionally, there were many places it could segfault if an exception occurred.
|
|\ \ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / / /
|/| | | | | | | | | | |
MAINT: Remove NPY_PY3K constant
|
| |/ / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
After this PR NPY_PY3K should only appear in 'npy_3kcompat.h' and
'doc/Py3K.rst.txt'
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
MAINT: Express PyArray_DescrAlignConverter in terms of _convert_from_any
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This also fixes an inconsequential bug, meaning the following (scary) code no longer asserts
```
np.typeDict['mypoint`] = [('a', 'i1'), ('b', 'i2')]
assert np.dtype('mypoint', align=True).isalignedstruct
```
I'm not going to legitimize this sort of thing with a test though.
|
| |/ / / / / / / / /
|/| | | | | | | | | |
|