| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | | | | | | |
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Also make internal versions accept a dtype and a descriptor.
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
This enables writing np.array(some_object, dtype=type(np.dtype('i'))). This
is a follow-on from https://github.com/numpy/numpy/pull/23154, see that PR
for more details.
I had to add a new include to `ctors.h` to bring in the definition of the
`npy_dtype_info` struct. Since `ctors.h` is included in many other files inside
numpy, I found that I needed to modify fewer includes across numpy if I moved
the definition of `npy_dtype_info` to `common.h` from `descriptor.h`. The new
includes of `common.h` are needed to support later includes of `ctors.h` in
those files. If anyone has an alternate place to put `npy_dtype_info` that would
cause less churn of includes I'd love to hear about it.
I spent a bunch of time tweaking the reference counts. I'm reasonably confident
this is correct but not 100%, an additional careful pass over the reference
count logic from a reviewer would be very appreciated.
I could have made `_PyArray_FromAny` and `_PyArray_CheckFromAny` take just a
`npy_dtype_info` struct, but I found it made the reference count logic more
complicated, since `PyArray_FromAny` and `PyArray_CheckFromAny` steal the
reference to the descriptor they are passed and I needed to conserve that
behavior. Also both functions support passing in a `NULL` pointer for the
descriptor and I needed to maintain that behavior as well.
The change to `ucsnarrow.h` fixes a preexisting conflict with the prototype
in `ucsnarrow.c` that triggered a compiler error while I was working on this.
|
| |\ \ \ \ \ \ \ \ \ \ \
| | |_|_|/ / / / / / / /
| |/| | | | | | | | | | |
ENH: Allow ``where`` argument to override ``__array_ufunc__``
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
override `__array_ufunc__`.
|
| | | | | | | | | | | | |
|
| | |/ / / / / / / / /
| |/| | | | | | | | |
| | | | | | | | | | | |
Fixes #23197
|
| |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
DEP: remove deprecated casting in np.clip
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Signed-off-by: Matti Picus <matti.picus@gmail.com>
|
| |/ / / / / / / / / / |
|
| |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
MAINT: cleanup unused Python3.8-only code and references
|
| | | | | | | | | | | | |
|
| |/ / / / / / / / / /
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Fx problem where, for example,
np.array([1], dtype='>u2') and np.array([1], dtype='<u2')
both got represented as np.array([1], dtype=uint16), or the dtype is not shown for the default ones (float64, default int).
|
| |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
DOC: Add `n_children` param to rng.spawn() and bitgen.spawn() docs
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
The original PR forgot to include the Parameters section (and thus
the paraeter itself).
|
| |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
BLD: add SSL2 default path for Fujitsu C/C++ compiler
|
| | | |_|_|_|_|_|_|/ / /
| | |/| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \ \ \
| | |_|/ / / / / / / / /
| |/| | | | | | | | | | |
MAINT: Update x86-simd-sort to latest commit
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
As discussed in
https://mail.python.org/archives/list/numpy-discussion@python.org/thread/UKZJACAP5FUG7KP2AQDPE4P5ADNWLOHZ/
This flag was always meant to be temporary, and cleaning it up is
long overdue.
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
- DOC: update git clone command in doc to initialize submodules
- BLD: Check for submodules before building
- CI: update meson.build check and Cirrus for new git submodule
[skip ci]
Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
|
| | |/ / / / / / / / /
| |/| | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This follows up on a review comment on gh-23314
[skip cirrus] [skip circle]
|
| |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
ENH: Add support for argmin and argmax for NEP42 dtypes
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
[skip actions] [skip travis] [skip cirrus]
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
[skip actions] [skip travis] [skip azp] [skip cirrus]
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
[skip actions] [skip travis] [skip azp] [skip cirrus]
|
| | |/ / / / / / / / /
| |/| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \ \
| | |_|_|_|_|_|/ / / /
| |/| | | | | | | | | |
BUG: ma with structured dtype
|
| | |/ / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Fixes #22041
* add regression test and fix for creating a masked array with a
structured dtype; the test is simply for lack of error in the repoducer
* the concern expressed by core team in matching issue was that
`astropy` might be negatively affected; I ran full `astropy` (hash: `c9ad7c56`)
test suite locally with this feature branch and it seemed "ok,"
just 1 unrelated network failure in the network-requiring tests
(`test_ftp_tls_auto`):
```1 failed, 21430 passed, 3490 skipped, 176 xfailed, 23275 warnings in
430.18s (0:07:10)```
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
ENH: add support for fujitsu C/C++ compiler and SSL2 to numpy.
|
| | | | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
TYP: Remove duplicate CLIP/WRAP/RAISE in __init__.pyi.
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
These constants are defined twice in this file, to which pytype objects.
|
| |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
TYP: Remove two stray type-check-only re-exports of `msort`
|
| | |/ / / / / / / / / / |
|
| |\ \ \ \ \ \ \ \ \ \ \
| | |/ / / / / / / / / /
| |/| | | | | | | | | | |
TYP: Fix return type to float on _FloatLike_co arguments
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Currently, `rng.exponential(scale=np.sum(np.arange(10.0)))` indicates
its return value as `np.ndarray[Any, dtype[float64]]` even though a
`float` is returned on `_FloatLike_co` values of the `scale` argument.
This commit fixes this problem such that `rng.exponential` indicates
the correct return type on `_FloatLike_co` inputs.
|
| |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
TYP: Replace duplicate reduce in ufunc type signature with reduceat.
|
| | | |_|/ / / / / / / /
| | |/| | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Presumably this is a typo: ufuncs have both reduce and reduceat.
|
| |\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
TYP: Add type annotations for comparison operators to MaskedArray.
|
| | |/ / / / / / / / / /
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
The comparison operators seem to be missing annotations; whereas pretty
much every other operator is annotated.
This causes pytype to conclude that the output of, say, __gt__ is a
regular ndarray, which isn't true.
|
| |/ / / / / / / / / /
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The type stubs incorrectly mark this argument as mandatory.
|
| |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
DOC: fix typos
|