| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* DOC: mention changes to `max_rows` behaviour
* Clarify how line counting works in max_rows
|
|\ \ \ \ \ \ \ \
| |_|_|_|/ / / /
|/| | | | | | | |
BUG: Handle NaNs correctly for float16 during sorting
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The meaning of the second argument in the mathematical notation
N(mu, b) for the normal distribution is not consistent. In some
references it is the variance while in others it is the standard
deviation. Let's avoid the ambiguity by not using the notation.
Fixes #21296
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
(#21851)
The keepdims flag needs to be applied during the calculation of the sum of
the weights in np.average and np.ma.average. Not passing it causes weights
to broadcast incorrectly.
Fixes #21850
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
API: Introduce optional (and partial) NEP 50 weak scalar logic
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
this also effectively fixes some corner cases in np.result_type
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
It seems that the (weird and probably non-existing in practice) case
of uint8 vs. int8 promotion when the input is a single integer was
broken at some point and this fixes it again.
This is only really relevant for rational, which defines only a very
selective number of integer promotions.
This fixes up the previous chunk that relaxes promotion fallbacks a lot
for legacy dtypes.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This follows the tests (and actually goes hand in hand with them).
There are still some apparent issues here though, I suspect (but
am not sure), the that the legacy promotion may need to kick in
more agressively when errors occur.
Also, surprisingly this fixes things that maybe should fail in
legacy promotion, and I am not yet sure why...
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Unfortunately, this shows that the rational tests are still broken a bit.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Co-authored-by: Bas van Beek <b.f.van.beek@vu.nl>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
If all are scalars, then legacy promotion is not forced but we would
use weak promotion internally suddenly (which we must not!).
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Forcing the output dtype does not work here, since it actually
can be integral (not that this is usually a good idea).
In practice, the change we are doing here is forcing 64bit (or
32bit depending on platform) of precision for the calculation.
This means that the change will only ever increase precision mildly
compared to the current situation.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The issue is that bools are subclasses of ints, which triggers the
more general problem that we cannot use the `int` abstract dtype
if the input has a concrete dtype associated (e.g. bools, but also
general user defined DTypes in principle)
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Also make the warning message sane :)
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This ensures that the precision is not downcast, which could make
a small value zero (for float16 mostly).
This lets tests pass that check whether `np.float16(0)` is almost
equal to 0, which otherwise fail (because `float16(0.00000001)`
will evaluate to 0 exactly.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Promotion in percentile will now more aggressively preserve the
input dtype for floating point types (rather than upgrading the
type to at least float64).
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We need to be able to query the state for testing, probably should
be renamed before the end, but need to have something for now.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Even the new promotion has to use the min-scalar logic to avoid
picking up a float16 loop for `np.int8(3) * 3.`.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| |_|/ / / / / / /
|/| | | | | | | | |
BUG: Fix discovered MachAr (still used within valgrind)
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This fixes the missing attributes. I tested the warning and fix
on valgrind itself.
These attributes were added in gh-18536 but the fallback path was
not checked there.
Replaces gh-21813, although something more like it may make sense
if it allows us to just delete MachAr completely.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fixes #9542
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* TST: Tests empty input to in1d of various types
* MAINT: Skip table method on empty input array
* MAINT: Check array size before call to min
* MAINT: Return early for kind="table" and empty ar2
* TST: Test other dtypes of empty arrays
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
BUG: Define `<`, `<=`, `>`, `>=` for masked arrays
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This defines the comparison operators (other than `==` and `!=`)
explicitly for masked arrays.
The mask is ignored for the resuling `res._data` (unlike `==` and
`!=` which take the mask into account.
Closes gh-21770, although the way that masked arrays propagate the
fill-value seems generally broken and error prone.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
ENH: Always fill object fields with None rather than NULL
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
This is an attempt to ensure that we will guarantee non-NULL
objects in the future.
We do not do so for freshly initialized buffers (they are NULLed
for simplicity).
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The intention here is to transition (or achieve?) a future where
NumPy always fills object fields with None rather than NULL.
Filling with NULL is nice (infinitely fast in some cases and easy),
but it also adds the trap of expecting NULLs everywhere.
Most importantly, cython fails to do so (currently) so this is a
bug magnet.
At this point, ideally any fully created array is guaranteed to be
initialized with proper Python objects. Downstream may break that,
so we should not allow it, but this does also add an assert to
many ufuncs to flush out further potential issues.
NULL initialization is (as of now) still relevant for new buffers.
That means that core functionality like `setitem`, or coping into
a buffer should still expect a NULL initialized value.
|