| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
| |
Add missing closing brackets, script to generate the list in the PR gh-16051.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* PEP 8: "Imports should usually be on separate lines"
* Where modified, sort imported modules alphabetically
* Clean-up unused imports from these expanded lines
|
| |
|
| |
|
| |
|
|
|
|
| |
Now that 2.7 is gone, there is no need to pop manually from kwarg dictionaries.
|
|
|
|
|
|
|
| |
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|\
| |
| | |
TST: improve assert message of assert_array_max_ulp
|
| |
| |
| |
| |
| |
| | |
It was not showing the max difference before, which makes it
hard to judge whether something is seriously wrong, or the test
precision simply needs to be bumped by a little.
|
|/ |
|
|
|
|
| |
Revise the BLAS name mangling to support the general scheme.
|
|
|
|
| |
MemoryErrors
|
|
|
|
| |
Fix wrong multiplier for /proc/meminfo, and do style cleanups.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
`np.datetime('NaT')` should behave more like `float('Nan')`.
Add needed infrastructure so `np.isinf(a)` and `np.isnan(a)`
will run on `datetime64` and `timedelta64` dtypes.
Also added specific loops for `numpy.fmin` and `numpy.fmax`
that mask `NaT`.
|
| |
|
| |
|
|
|
|
|
|
| |
Fixed maximum relative error reporting in assert_allclose:
In cases where the two arrays have zeros at the same positions it will
no longer report nan as the max relative error
|
|
|
| |
* Deprecation: numpy.testing.rand
|
|
|
|
|
| |
The original message included "Mismatch: 33.3%". It's not obvious what this
percentage means. This commit changes the text to
"Mismatched elements: 1 / 3 (33.3%)".
|
| |
|
|
|
|
|
|
| |
* DOC, MAINT: Misc. typo fixes
Found via `codespell`
|
| |
|
|\
| |
| | |
MAINT: implement assert_array_compare without converting array to python list
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
| |
* DOC: defaults in allclose not the same as in assert_allclose
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example behavior:
>>> x = np.array([1, 2, 3])
>>> y = np.array([1, 2, 3.0001])
>>> np.testing.assert_allclose(x, y)
AssertionError:
Not equal to tolerance rtol=1e-07, atol=0
Mismatch: 33.3%
Max absolute difference: 0.0001
Max relative difference: 3.33322223e-05
x: array([1, 2, 3])
y: array([1. , 2. , 3.0001])
Motivation: when writing numerical algorithms, I frequently find myself
experimenting to pick the right value of `atol` and `rtol` for
`np.testing.assert_allclose()`. If I make the tolerance too generous, I risk
missing regressions in accuracy, so I usually try to pick the smallest values
for which tests pass. This change immediately reveals appropriate values to
use for these parameters, so I don't need to guess and check.
|
|
|
|
|
|
|
|
| |
* ported the refguide_check module from SciPy for usage
in NumPy docstring execution/ verification; added the
refguide_check run to Azure Mac OS CI
* adjusted NumPy docstrings such that refguide_check passes
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
|\
| |
| | |
BUG: Fix misleading assert message in assert_almost_equal #12200
|
| |
| |
| |
| |
| | |
Fixes #12200 by making a copy of the matrix before NaN's are excluded.
Add a test for it.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ENH: __array_function__ support for np.lib, part 2
xref GH12028
np.lib.npyio through np.lib.ufunclike
* Fix failures in numpy/core/tests/test_overrides.py
* CLN: handle depreaction in dispatchers for np.lib.ufunclike
* CLN: fewer dispatchers in lib.twodim_base
* CLN: fewer dispatchers in lib.shape_base
* CLN: more dispatcher consolidation
* BUG: fix test failure
* Use all method instead of function in assert_equal
* DOC: indicate n is array_like in scimath.logn
* MAINT: updates per review
* MAINT: more conservative changes in assert_array_equal
* MAINT: add back in comment
* MAINT: casting tweaks in assert_array_equal
* MAINT: fixes and tests for assert_array_equal on subclasses
|
|
|
|
|
|
|
| |
Use np.all instead of the *.all method to be a bit more robust against
bad subclasses of ndarray that may change the behavior of the method.
Closes #11743.
|
| |
|
| |
|
|\
| |
| | |
BUG,MAINT: Ensure masked elements can be tested against nan and inf.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This brought to light two bugs in tests, which are fixed here, viz.,
that a sample ndarray subclass that tested propagation of an added
parameter was incomplete, in that in propagating the parameter in
__array_wrap__ it assumed it was there on self, but that assumption
could be broken when a view of self was taken (as is done by
x[~flagged] in the test routine), since there was no
__array_finalize__ defined.
The other subclass bug counted, incorrectly, on only needing to provide
one type of comparison, the __lt__ being explicitly tested. But flags
are compared with __eq__ and those flags will have the same subclass.
|
| |
| |
| |
| |
| |
| |
| | |
The removal of nan and inf from arrays that are compared using
test routines like assert_array_equal treated the two arrays
separately, which for masked arrays meant that some elements would
not be removed when they should have been. This PR corrects this.
|
| | |
|
|/
|
|
| |
Since this is now in `np.testing._private`, it's no longer usable by the outside world anyway
|