| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Same as 64-bit divistion, except quad wide divison leads
to inaccurate multiplier in certain cases when the log2 of
the divisor overflow to zero.
|
| |
|
|
| |
data ranges
|
| |
|
|
|
|
| |
The multiplier factor that used for integer division wasn't correctly
calculated due inaccurate implementation of the emulated version
of intrinsic `_udiv128`.
|
| |\
| |
| | |
REL: Update main after 1.21.3 release.
|
| | | |
|
| |\ \
| |/
|/| |
MAINT: core: Update the comment about _parse_signature with more complete info.
|
| |/ |
|
| |\
| |
| | |
DOC: Reword array has one axis
|
| | | |
|
| |\ \
| |/
|/| |
BUG: core: Fix incorrect check of NpyIter_Deallocate return value.
|
| |/
|
|
|
|
|
| |
NpyIter_Deallocate returns 0 for failure and 1 for success,
so the check `NpyIter_Deallocate(iter) < 0` is not correct.
(See relevant comments in gh-20069.)
|
| |\
| |
| | |
MAINT: Refactor reductions to use NEP 43 style dispatching/promotion
|
| | |
| |
| |
| |
| |
| | |
In particular, this covers a casting error that currently cannot
be hit for normal ufuncs, because they already check casting during
the legacy dtype resolution (which is called first).
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
More fixups are coming, the biggest change is that the error message
is now improved when a reduction makes no sense such as
`np.subtract.reduce(np.array([1, 2, 3], dtype="M8[s]"))`
where input and output cannot have the same descriptor.
(Some more fixups still to go)
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
At least the reduceat path seems to have been untested before.
The slight change in code layout (added assert) is just to make
the code slightly easier to read. Since otherwise it looks like
there is an additional `else` branch when `out` is given.
|
| | |
| |
| |
| |
| |
| |
| | |
This did not actually trigger any problems, probably because the
reduce fallback mode later just catches it anyway...
On the upside, this probably fixes most of the caching issues ;)
|
| | |
| |
| |
| |
| |
| | |
Mainly to see if this is indeed the problem, but the assert is
not necessary, and it might be we end up with the wrong dtype when
the input is a compatible (but different) integer already?
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This also implements new promoters for the logical functions.
The reasoning is that any logical function can always be handled
by first casting to boolean without changing the meaning.
This is true (unless the output is object), and already effectively
used for `np.all`/`np.any`.
|
| |\ \
| | |
| | | |
MAINT: Bump hypothesis from 6.23.2 to 6.23.3
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.23.2 to 6.23.3.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.23.2...hypothesis-python-6.23.3)
---
updated-dependencies:
- dependency-name: hypothesis
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* ENH: Create an experimental export of the new DType API
This expposes an experimental DType and ufunc API.
It can be used by including the experimental header AND
setting the `NUMPY_EXPERIMENTAL_DTYPE_API=1` environment variable.
A user must further call:
if (import_experimental_dtype_api(version) < 0) {
return NULL;
}
with a strict version check that will error on any mismatch.
At this time, I _know_ that some changes will happen, but it feels like
it may be a good idea to make this public anyway, with all the problems
attached... (e.g. as of now ufunc reductions will just not work, since
that PR is not yet merged.)
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |\ \
| | |
| | | |
DOC: Add note to iterable docstring about 0d arrays.
|
| |/ /
| |
| |
| | |
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| |\ \
| | |
| | | |
DOC: Remove double property ctypes from ndarray
|
| |/ /
| |
| | |
Fix #20117
|
| |\ \
| | |
| | | |
DOC: fix minor typo in comment
|
| |/ / |
|
| |\ \
| | |
| | | |
ENH: Add annotations for `np.matrix`
|
| | | | |
|
| | | | |
|
| |\ \ \
| |/ /
|/| | |
MAINT: Update F2PY documentation URL
|
| |/ /
| |
| |
| | |
http://cens.ioc.ee/projects/f2py2e/ is unavailable and links to NumPy and SciPy at https://web.archive.org/web/20140822061353/http://cens.ioc.ee:80/projects/f2py2e/ are too outdated.
|
| |\ \
| | |
| | | |
BUG: core: result_type(0, np.timedelta64(4)) would seg. fault.
|
| | | | |
|
| | | |
| | |
| | | |
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before this change, the line in convert_datatype.c
result = PyArray_CastDescrToDType(all_descriptors[0], common_dtype);
would trigger a seg. fault with a call such as
np.result_type(0, np.timedelta64(4))
The problem was that `all_descriptors[0]` was NULL, and it was
dereferenced in PyArray_CastDescrToDType.
The code in the loop that followed the above line avoided passing
NULL values in all_descriptors[i] to PyArray_CastDescrToDType by
checking that the corresponding input argument to `result_type`
was not a Python scalar. A different code path was taken in that
case. The seg. fault is fixed by applying that same check to the
first argument.
Closes gh-20077.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Developer-Ecosystem-Engineering/as_avx-512f-log-overflow
BUG: AVX-512F log() overflows
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
LLVM has a bug with AVX-512F masked multiply intrinsic `_mm512_mask_mul_pd`. The multiply operation is performed unmasked with a masked store. This can cause FP exceptions for lanes that should be masked.
LLVM bug report: https://bugs.llvm.org/show_bug.cgi?id=51988.
The bug affects NumPy / SciPy because NumPy has an AVX-512F implementation for log(), which uses a masked multiply intrinsic: `_mm512_mask_mul_pd`.
The bug surfaces in SciPy when trying to setup constants:
```
# The largest [in magnitude] usable floating value.
_XMAX = np.finfo(float).max
# The log of the largest usable floating value; useful for knowing
# when exp(something) will overflow
_LOGXMAX = np.log(_XMAX)
```
The workaround here explicitly masks the inputs before the multiply operation.
**Testing**
- Added a test case to numpy/core/tests/test_umath.py
- Fails on trunk
- Passes after workaround
SciPy testing before:
```
93 failed, 22378 passed, 1385 skipped, 93 xfailed, 7 xpassed, 1128 errors in 117.54s (0:01:57)
```
SciPy testing after:
```
74 failed, 33361 passed, 2230 skipped, 108 xfailed, 8 xpassed in 178.19s (0:02:58)
```
Note, all `1128` errors have been resolved as well as less test failures (`93` --> `74`)
|
| |\ \ \
| | | |
| | | | |
MAINT: Bump pycodestyle from 2.7.0 to 2.8.0
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bumps [pycodestyle](https://github.com/PyCQA/pycodestyle) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/PyCQA/pycodestyle/releases)
- [Changelog](https://github.com/PyCQA/pycodestyle/blob/main/CHANGES.txt)
- [Commits](https://github.com/PyCQA/pycodestyle/compare/2.7.0...2.8.0)
---
updated-dependencies:
- dependency-name: pycodestyle
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| |\ \ \
| |/ /
|/| | |
MAINT: Bump hypothesis from 6.23.1 to 6.23.2
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.23.1 to 6.23.2.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.23.1...hypothesis-python-6.23.2)
---
updated-dependencies:
- dependency-name: hypothesis
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| |\ \
| | |
| | | |
DOC: fix typo in docstring of bitwise_or
|