| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This PR const qualifies the dimension and strides arguments of PyUFuncGenericFunction. Const qualified arguments make it simpler to reason about the behaviour of these ufuncs and prevents accidental mutation. As the const is now required this PR also const qualifies calls to PyUFuncGenericFunction inside the NumPy source code.
This closes #15252
|
|\
| |
| | |
STY: Use `with open` when possible
|
| | |
|
|/ |
|
|\
| |
| | |
MAINT: simd: Avoid signed comparison warning
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We do not need to cast the dimensions (`n`) to ``npy_uintp`` when
comparing it to the stride length (of type ``npy_intp``). The cast is
kept from similar checks where the cast is required
``(npy_uintp)n < (VECTOR_SIZE_BYTES / sizeof(@type@))``
In this case `strides` is precalcuated as
``VECTOR_SIZE_BYTES / (npy_intp)sizeof(@type@))``
therefore `n` is already of the correct type when the check is
performed.
|
|/
|
|
| |
This implements NEP 34.
|
| |
|
| |
|
|\
| |
| | |
BUILD: use standard build of OpenBLAS for aarch64, ppc64le, s390x
|
| | |
|
| | |
|
|\ \
| | |
| | | |
MAINT: linalg: use symbol suffix in fallback lapack_lite
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When building the fallback lapack_lite library for numpy.linalg,
add symbol suffix to the routines when using 64-bit integer indices.
Adjust the lapack_lite generator script to also output a header file
that renames the symbols. Moreover, also rename symbols from f2c.c, to
be sure (because they have short and generic names that may clash).
This avoids a name clash with BLAS/LAPACK names, which can cause
problems in corner cases on platforms where inadvertent symbol
overriding in dynamic libraries can occur.
|
|\ \ \ |
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* ENH: add identity kwarg to frompyfunc
* Update umathmodule.c
* Add test, docs, and release note for identity
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|\ \ \
| | | |
| | | | |
MAINT: cleanup compat.py3k.py
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
DEP: records: Deprecate treating shape=0 as shape=None
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`shape=n` is a shorthand for `shape=(n,)` except in the case when `n==0`, when it is a shorthand for `shape=None`.
This special case is dangerous, as it makes `fromrecords(..., shape=len(a))` behave surprisingly when a is an empty sequence.
Users impacted by this warning either:
* Have a bug in their code, and will need to either:
- wait for the deprecation to expire
- change their code to use `(len(a),)` instead of `len(a)`
* Are using the non-preferred spellling, and will need to replace a literal `0` or `False` with `None`
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
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.
|