| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
This reverts commit 8cd6f4ca00b6e0da3833fc267d50067b2ddbc069.
|
|
|
|
|
|
| |
This enables any ufunc numpy operations that are called on a
MaskedArray to use the masked version of that function automatically
without needing to resort to np.ma.func() calls.
|
| |
|
|
|
|
|
|
| |
This enables any ufunc numpy operations that are called on a
MaskedArray to use the masked version of that function automatically
without needing to resort to np.ma.func() calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR fixes the issue discussed on #12065 and #21843 where 'timedelta64' was noted to be a subtype of numpy.integer. This in principle should detect any cases where int(np.min(ar2)) fails. This PR also adds unittests for these.
* TST: Create in1d test for timedelta input
* MAINT: fix in1d for timedelta input
* TST: in1d raise ValueError for timedelta input
* MAINT: Clean up type checking for isin kind="table"
* TST: Add test for mixed boolean/integer in1d
* MAINT: Increase readability of in1d type checking
* STY: Apply small code style tweaks
This is probably really mainly my personal opinion...
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
|\
| |
| | |
ENH,MAINT: Improve and simplify scalar floating point warnings
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the scalar operations warnings read e.g.:
overflow encountered in scalar multiply
rather than:
overflow encountered in float_scalars
It also fixes one case where "assignment" rather than "cast" was
used when I added the FPEs for casts.
Otherwise, uses the helper that I intrudced for for the floating
point casts in all places to simplify the code, the only
"complicated" thing is that I try to give "scalar divide" rather
than "scalar true_divide" as warnings, since "true_divide" should
not really be something that end-users need be aware of.
|
|/
|
|
|
|
|
|
| |
Non integer array-likes were not correctly rejected when a new
fast-path was added to `np.delete` in gh-16895.
This includes the _explicitly_ added `dtype=object` which should
not be allowed since it is not allowed in normal indexing either.
Closes gh-21840
|
|
|
|
|
|
|
|
|
| |
(#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
|
| | |
|
| |
| |
| |
| |
| |
| | |
Promotion in percentile will now more aggressively preserve the
input dtype for floating point types (rather than upgrading the
type to at least float64).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
|\ \
| | |
| | | |
MAINT: Optimize np.isin and np.in1d for integer arrays
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
- Switch dictionary->table, mergesort->sort
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
- Add flag ``_slow_integer`` to np.isin/np.in1d to force the use of the
old isin/in1d algorithm for integers.
|
| | |
| | |
| | |
| | |
| | |
| | | |
- These tests hit the areas of the old algorithm which are now replaced
for the majority of cases
- Another test tests behaviour of boolean input to isin/in1d
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
|
|
|
|
|
| |
In release mode, the DeprecationWarning is not automatically raised,
so we need to ensure this using a warning filter.
(Also add missing metadata/info to the deprecation tests)
Closes gh-21706
|
|\
| |
| | |
BUG: Fix three `complex`- & `float128`-related issues with `nd_grid`
|
| | |
|
| |
| |
| |
| |
| |
| | |
The normed keyword argument has been deprecated for a long time.
This removes it, replacing its position with the new density
argument.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The other similar arguments in the testing functions and `np.array_equal`
use `equal_nan` and not `equal_nans` (with plural s). So it seems we
should use that here as well for consistency.
Does some very minor style fixes otherwise.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
seberg/fix-void-cast-safety-promotion-and-comparison
API: Fix structured dtype cast-safety, promotion, and comparison
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This PR replaces the old gh-15509 implementing proper type promotion
for structured voids. It further fixes the casting safety to consider
casts with equivalent field number and matching order as "safe"
and if the names, titles, and offsets match as "equiv".
The change perculates into the void comparison, and since it fixes
the order, it removes the current FutureWarning there as well.
This addresses https://github.com/liberfa/pyerfa/issues/77
and replaces gh-15509 (the implementation has changed too much).
Fixes gh-15494 (and probably a few more)
Co-authored-by: Allan Haldane <allan.haldane@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Closes gh-9982.
(Plus a few small PEP 8 fixes.)
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Optimizes the parsing of shape tuples and integers by avoiding multiple conversions and generally
refactoring the code.
Closes gh-19010, that parsing a single integer was very slow (due to trying to convert it to a squence twice).
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
* Added `mat` cases to smoke tests
* Changed type checks to handle new change which uses ufuncs order for
result determination
* Added cases for `ma` to check subclass info retention
|
| | |
|
| |
| |
| |
| |
| |
| | |
* Smoke tests to ensure `np.kron` works.
* Shape tests to check if `np.kron` computes the right shape for
different edge cases of input arrays
|
|\ \
| | |
| | | |
MAINT: extend delete single value optimization
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the delimiter is None and we are splitting on whitespace,
a final empty field is always ignored to match the behaviour
of pythons split: `" 1 ".split()`.
Closes gh-21052
|