| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* TST: Mixed integer types for in1d
* BUG: Fix mixed dtype overflows for in1d (#22877)
* BUG: Type conversion for integer overflow check
* MAINT: Fix linting issues in in1d
* MAINT: ar1 overflow check only for non-empty array
* MAINT: Expand bounds of overflow check
* TST: Fix integer overflow in mixed boolean test
* TST: Include test for overflow on mixed dtypes
* MAINT: Less conservative overflow checks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| |
|
| |
|
| |
|
|
|
|
| |
- Switch dictionary->table, mergesort->sort
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Hameer Abbasi <2190658+hameerabbasi@users.noreply.github.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Add flag ``_slow_integer`` to np.isin/np.in1d to force the use of the
old isin/in1d algorithm for integers.
|
|
|
|
|
|
|
|
|
|
|
| |
- Before this fix, if, e.g., int8(-100) and int8(100) are the min and
max, respectively, of ar2, ar2_range would experience an integer
overflow and optimal_parameters would be an invalid value.
``if optimal_parameters:`` would skip the fast integer algorithm
regardless, but warnings would be generated when they are unnecessary.
- np.log10(... + 1) was changed to np.log10(... + 1.0) to avoid further
potential problems from overflow here.
- See https://github.com/numpy/numpy/pull/12065 for discussion.
|
|
|
|
|
| |
- This change converts boolean input to numpy.isin and numpy.in1d into uint8, allowing
the function to use the new optimized code
|
|
|
|
|
|
| |
- This optimization indexes with an intermediary boolean array to speed up
numpy.isin and numpy.in1d for integer arrays over a range of optimal parameters
which are calculated.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
|
|
| |
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- improper urls
- a few use of single bakcticks where many are expected
- Proper numpydoc format
[ci skip]
[skip azp]
[skip circle]
|
|
|
|
|
| |
This PR adjusts np.unique for the edge cases where all values are nan.
Fixes gh-19300
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* benchmark bench_lib.Unique added
* extended test_unique_1d
* modify _unique1d
* extend test with return_index, return_inverse and return_counts parameters
* documentation updated
* Update numpy/lib/arraysetops.py
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* full coverage of nan types
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* added tests for the datetime like dtypes
* nan as vector of length 1
* use aux[-1] as nan, ..versionchanged, release note
* for complex arrays all NaN values are considered equivalent
Co-authored-by: filip_trojan <Tarantula2018>
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
| |
Fixes the error message reported by ediff1d in the case of
an invalid to_begin and updates tests to assert validity.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
|
|
|
|
|
| |
* Generate stub for module, fixes 7 broken links
* Modify arraysetops module docstring w/ rst formatting
* Remove listing of functions from module docstring.
|
|
|
|
|
|
|
|
|
|
|
| |
* MAINT: chain type error line 303 arraysetops.py
* MAINT: chain axis error line 281 arraysetops.py
* Revert "MAINT: chain axis error line 281 arraysetops.py"
This reverts commit f6e1f544bebb7e5346cb83bdac9756be6ee9f4f6.
* MAINT: chain axis error line 281 arraysetops.py to be from None
|