| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The shim has been deprecated since 2019, the proper place to import
utils funtions is directly from numpy.testing.
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NumPy switched to using pytest in 2018 and nose has been unmaintained
for many years. We have kept NumPy's nose support to avoid breaking
downstream projects who might have been using it and not yet switched to
pytest or some other testing framework. With the arrival of Python 3.12,
unpatched nose will raise an error. It it time to move on.
Decorators removed
- raises
- slow
- setastest
- skipif
- knownfailif
- deprecated
- parametrize
- _needs_refcount
These are not to be confused with pytest versions with similar names,
e.g., pytest.mark.slow, pytest.mark.skipif, pytest.mark.parametrize.
Functions removed
- Tester
- import_nose
- run_module_suite
|
|
|
|
| |
assert_array_equal (#23015)
|
|
|
| |
Followup for gh-22533. Adds a missing return statement to get_overridable_numpy_ufuncs (oops!) and imports numpy.testing.overrides into numpy.testing so e.g. tab completion on numpy.testing works for overrides.
|
|\
| |
| | |
API: Add numpy.testing.overrides to aid testing of custom array containers
|
| |
| |
| |
| | |
Closes #15544
|
| |
| |
| |
| | |
[skip actions] [skip travis] [skip azp]
|
|/ |
|
|
|
|
|
|
|
|
| |
In some cases, the replacement is clearly not what is intended,
in those (where setup was called explicitly), I mostly renamed
`setup` to `_setup`.
The `test_ccompile_opt` is a bit confusing, so left it right now
(this will probably fail)
|
|
|
|
|
|
|
| |
This PR replaces the import of platform and a call to platform.python_implementation() with a check using sys.implementation.name to improve the numpy import time. The improvement is about 5-10 ms (system dependent).
Also see #22061
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
| |
|
| |
|
|\
| |
| | |
ENH: Ensure that assertion of unsigned dtypes does not return results
|
| |
| |
| |
| | |
that wrapped around.
|
| | |
|
|\ \
| | |
| | | |
API: Introduce optional (and partial) NEP 50 weak scalar logic
|
| | |
| | |
| | |
| | | |
Unfortunately, this shows that the rational tests are still broken a bit.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This ensures that the precision is not downcast, which could make
a small value zero (for float16 mostly).
This lets tests pass that check whether `np.float16(0)` is almost
equal to 0, which otherwise fail (because `float16(0.00000001)`
will evaluate to 0 exactly.
|
| | | |
|
| |/
| |
| |
| |
| | |
Even the new promotion has to use the min-scalar logic to avoid
picking up a float16 loop for `np.int8(3) * 3.`.
|
|/
|
|
|
|
| |
Fixes #9542
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
|
|\
| |
| | |
DOC: Improve docstring of numpy.testing.assert_allclose
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
seberg/fix-void-cast-safety-promotion-and-comparison
API: Fix structured dtype cast-safety, promotion, and comparison
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This PR replaces the old gh-15509 implementing proper type promotion
for structured voids. It further fixes the casting safety to consider
casts with equivalent field number and matching order as "safe"
and if the names, titles, and offsets match as "equiv".
The change perculates into the void comparison, and since it fixes
the order, it removes the current FutureWarning there as well.
This addresses https://github.com/liberfa/pyerfa/issues/77
and replaces gh-15509 (the implementation has changed too much).
Fixes gh-15494 (and probably a few more)
Co-authored-by: Allan Haldane <allan.haldane@gmail.com>
|
|/ |
|
|
|
|
| |
i.e. `numpy.typing` and `numpy._typing`
|
|
|
|
|
|
|
|
|
|
|
| |
* TST: Test suppression of asset_array_equal RuntimeWarning See #18992
* ENH: Suppress over-/underflow warnings on asset_array_equal - Closes #18992
* MAINT: Resolve linting issues of prior commit
* MAINT: Simplified ignore and test case of asset_array_equal
* MAINT: Removed unused import in test_utils.py
|
|\
| |
| | |
TYP,ENH: Improve typing with the help of `ParamSpec`
|
| | |
|
|\ \
| |/
|/| |
BUG: Avoid importing numpy.distutils on import numpy.testing (#20769)
|
| |
| |
| |
| |
| | |
Move the offending imports into the functions that use them so that
numpy.distutils is only loaded if those functions are required.
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the cast-is-view flag with a more generic intp output.
Such an output could (theoretically) be nonzero, indicating e.g.
the offset of a complex number into a real one.
(We do not use this yet, though!)
The only "tricky" part is that the MinCastSafety helper used to
deal with the view-offset as well, and now we have to deal with it
explicitly when e.g. multiple fields have to be checked.
Bumps the experimental-dtype-api number, since the signatures changed.
* MAINT,DOC: Cleanups and clarfications based on Marten's comments
Co-Authored-By: Marten van Kerkwijk <mhvk@astro.utoronto.ca>
* MAINT: Rename `PyArray_GetCastSafety` to `PyArray_GetCastInfo`
Better captures the fact that it also returns the view-offset
information now.
* MAINT: Fix structured cast-is-view logic
* MAINT: Address review comments by Marten
Co-authored-by: Marten van Kerkwijk <mhvk@astro.utoronto.ca>
|
| |
|
|
|
|
|
|
|
| |
`load_module` is deprecated since python 3.4 and will be removed in python 3.12.
Use `exec_module` instead. Provide a convenience function in `distutils.misc_utils`
instead of `npy_load_module` from `compat.py3k`.
|
| |
|