| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Move the possible_flags dictionary to a global value so it is not
re-constructed each call.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Document that other Python sequences are acceptable as arguments, not
just lists.
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
MAINT: use PyErr_SetString in _import_array where possible
|
| |/ / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Update error messages in _import_array to avoid format string
processing when not needed by the error message text.
|
|\ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
ENH: Change f2c declarations with void return type to int
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
When using f2c, the generated C functions for all of these actually
return int. WebAssembly is strict on return types and will crash due
to the discrepancy.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
When empty structured arrays with nontrivially shaped fields are
compared, the reshape operation invoked fails. Instead of reshaping
using -1, computing the new dimension manually solves the problem.
Fixes gh-21739
|
| |_|_|_|/ / / / /
|/| | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fix the reversed arguments to the call of PyErr_Format() that generates
the exception for an invalid index in usecols.
Also fix the format characters in several other calls of PyErr_Format()
where the arguments are Py_ssize_t.
|
| |_|_|_|_|_|/ /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Related Issues/PRs
Follow-up to #21648
Changes
Adds check to scalar negative for determining whether an overflow warning should be raised for signed integers. Improves testing for negative operator on unsigned integers.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This was giving a lot of warnings like:
numpy/f2py/src/fortranobject.h:9: warning: "NPY_NO_DEPRECATED_API" redefined
when building SciPy. In general, this is generated code which is
included in the build of other projects which may have already set this
macro - so only set it if it is not yet set.
The other change is to set it to the current numpy version, like is done
everywhere else in numpy, rather than to a fixed 1.7 version.
This will ensure that if new deprecations happen, f2py gets updated for
them.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
WarrenWeckesser/hameerabbasi-disallow-complex-gaussian
MAINT: random: Disallow complex inputs in multivariate_normal
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* Disallow both mean and cov from being complex.
* Raise a TypeError instead of a NotImplementedError if mean or cov is
complex.
* Expand and fix the unit test.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commit disallows complex covariances in multivariate_normal
as passing them can silently lead to incorrect results.
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This path was left behind by mistake,
VSX and ZVEC are combined inside one path /vec
|
| | | | | | | |
| | | | | | | |
| | | | | | | | |
recieve -> receive inline comment
|
|\ \ \ \ \ \ \ \
| |_|_|/ / / / /
|/| | | | | | | |
MAINT: Add a check of the return value of PyMem_Calloc().
|
| | | | | | | | |
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* Fix computation of numpy.array_api.linalg.vector_norm
Various pieces were incorrect due to a lack of complete coverage of this
function in the array API test suite.
* Fix the output dtype nonstandard vector norm()
Previously it would always give float64 because an internal calculation
involved a NumPy scalar and a Python float. The fix is to use a 0-D array
instead of a NumPy scalar so that it type promotes with the float correctly.
Fixes #21083
I don't have a test for this yet because I'm unclear how exactly to test it.
* Clean up the numpy.array_api.linalg.vector_norm code a little bit
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* Changed f-string format
Changed f-string format for the clear and clean understanding of code.
* Update test_abc.py
|
| |_|/ / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | | |
A small step towards numpy namespace cleanup. Removes a few names
from `__dir__` so that they are less discoverable when using
numpy interactively, e.g. in IPython or notebooks.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Possibly they were just not incref'd in an earlier version of the
code. But incref'ing seems right, so this adds the proper decref
loop.
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
BUG: Do not skip value-based promotion path for large Python integers
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When we have:
1. Only Python scalars (int, float, complex) as inputs
2. One of the integers is too large for the default integer dtype
The "new" promotion path (which existed for a long time internally!)
would not produce the same result as the legacy value-based path.
However, my logic failed to check for the second part, so it did not
run the legacy path in this odd little case.
This fixes the issue reported in:
https://github.com/numpy/numpy/issues/13754#issuecomment-1155126639
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
ENH: Add support for platforms with missing fenv flags
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This builds on the previous, but just redefines them in the C/C++ file
since this is not a header and defining an undefined macro value should
not be a problem locally.
Also tweaks the comment a bit.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
For instance wasm has no fenv support. musl-libc defines all the
fenv functions unconditionally (fesetexcept, feclearexcept, etc)
but on unsupported platforms they are no-ops:
https://git.musl-libc.org/cgit/musl/tree/src/fenv/fenv.c
However, the platform is expected to only define flags like
FE_OVERFLOW if they are supported. I haven't found an explanation
of the design decision, but it seems to be aimed at fine-grained
feature detection. musl-libc-test has code that uses fenv and wants
it to silently decay to a no-op on platforms missing support. I
copied their implementation of this behavior:
http://nsz.repo.hu/git/?p=libc-test;a=blob;f=src/common/mtest.h;h=706c1ba23ea8989b17a2f72ed1a919e187c06b6a;hb=HEAD#l30
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* limit the number of decimals in Polynomial representation
* tests pass
* parenthesize exponential notation in polynomials
* fixed a long line warning
* added polynomial printoptions tests
* polynomial printoptions typo fixed
* made switch to exp notation in polynomial display more natural
* added a test on switching polynomials to exp notation
* fixed linter errors/warnings
* support for nanstr and infstr printoptions in polynomials
* 10^8 threshold for switching to exp notation when displaying polynomials
* merged in PR #21696 fixing issue #21695
* made linter happy
* made some docstring tests pass
* fixed the docs
Co-authored-by: Lev Maximov <lev.maximov@gmail.com>
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
BUG: Adding the default pytest doctest instead of the ValueError
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
the np testrunner
|
|\ \ \ \ \ \ \ \
| |_|/ / / / / /
|/| | | | | | | |
BUG, SIMD: Fix detecting NEON/ASIMD on aarch64
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
BUG: Fix for npyv_orc_b8 and npyv_xnor_b8 for s390x (z13)
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Implement npyv_orc_b8 and npyv_xnor_b8 for z13.
'__builtin_s390_vec_orc' and `__builtin_s390_vec_eqv` require z14 or higher.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
ENH: Add floating point error checking to (almost) all casts
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The remaining uncovered paths seem to me like code that should be
effectively unreachable.
(I do actually wonder if `PyArray_MapIterReset` should be removed.)
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Resetting the buffer will copy it, which may cause casting errors.
And we want to prefer/catch those later ideally.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
deficiencies
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
unnecessary delay
The delay is not necessary, because the iterator does not cast in any case, so we do not
actually care about the possibility of errors being raised.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The test meant to assert shapes, but didn't actually do it.
|
| | | | | | | | | |
|
| | | | | | | | | |
|