| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of `import numpy.testing as npt`.
- all of NumPy's own tests themselves use the from-import variant
- There's `import numpy.typing as npt` around in some places so
we should not abbreviate another module import with `npt`.
Optional further enhancement: If this is a convention we also want
users to adopt, this should be mentioned in the module docstring of
`numpy.testing`.
|
|\
| |
| | |
ENH: Use new argument parsing for array creation functions
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The array creation functions have the most to gain:
1. np.asarray is 4 times faster and commonly used.
2. Other functions are wrapped using __array_function__ in Python
making it more difficult
This commit (unfortunatly) has to do a few things:
* Modify __array_function__ C-side dispatching to accomodate
the fastcall argument convention.
* Move asarray, etc. to C after removing all "fast paths" from
np.array (simplifying the code)
* Fixup imports, since asarray was imported directly in a few places
* Replace some places where `np.array` was probably used for speed
instead of np.asarray or similar. (or by accident in 1 or 2 places)
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This update a coupe of references (single backticks) that actually are not to
verbatim/code (double backticks); and a couple of verbatim to reference
when they do actually exists and can be resolved in context.
I probably missed other; and stayed simple but spoted a few other
inconsistencies that I did not fix:
- some ``...`` could actually be :math:`...` but not always clear if
it would be better.
- some intervals are [``...``], other are ``[...]``
I guess they could be discussed individually; it was mostly the failing
references that bothered me.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ENH: Add traceback-skip to `assert_array_compare`
* TST: Add tests for arraycoercion
These tests have many xfails (some technically maybe not correct),
which describe in detail what will change when merging the
array-coercion changes; since all of those xfails are going
to be removed.
* TST: Add test for empty sequences
* TST: Add tests for bad self-mutating sequence inputs to np.array
These should never happen and rightly should lead to undefined
behaviour (and preferably errors), but they excercise some more
tricky code branches and should probably not crash.
* Simplify the "all scalars" logic (hardcode) and fix complex cases
* MAINT: Some cleanup, and xfail pypy
PyPy seems to have issues with int(numpy_complex), maybe because
it gives a warning during conversion (python does not define it).
So simply mark it as xfail, it should work in my branch.
Also some smaller cleanups.
* TST: Add some further test, re-add missing rational
* MAINT: Make rationals optional, because they fail some tests currently
The failures will go away, since this must again be related to
implemetning int() and float().
* Update numpy/conftest.py
* MAINT: Fix strings and use pytest.param to clean things up
* TST: Add tests for 0-D array-like input to np.array() corner-cases
* TST: Improve parameterization IDs to get better printing at -vv
|
| |
|
| |
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|