You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy-pasted from numpy documentation: https://numpy.org/doc/stable/reference/generated/numpy.isin.html
4849
+
Calculates element in test_elements, broadcasting over element only. Returns a boolean array of the same shape as element that is True where an element of element is in test_elements and False otherwise.
4850
+
4851
+
Parameters
4852
+
----------
4853
+
element : blosc2.Array
4854
+
Input array.
4855
+
4856
+
test_elements : blosc2.Array
4857
+
The values against which to test each value of element. This argument is flattened if it is an array or array_like.
4858
+
4859
+
assume_unique: bool, optional
4860
+
If True, the input arrays are both assumed to be unique, which can speed up the calculation. Default is False.
4861
+
4862
+
invert: bool, optional
4863
+
If True, the values in the returned array are inverted, as if calculating element not in test_elements. Default is False. np.isin(a, b, invert=True) is equivalent to (but faster than) np.invert(np.isin(a, b)).
4864
+
4865
+
kind: {None, 'sort', 'table'}, optional
4866
+
The algorithm to use. This will not affect the final result, but will affect the speed and memory use. The default, None, will select automatically based on memory considerations.
4867
+
If 'sort', will use a mergesort-based approach. This will have a memory usage of roughly 6 times the sum of the sizes of element and test_elements, not accounting for size of dtypes.
4868
+
If 'table', will use a lookup table approach similar to a counting sort. This is only available for boolean and integer arrays. This will have a memory usage of the size of element plus the max-min value of test_elements. assume_unique has no effect when the 'table' option is used.
4869
+
If None, will automatically choose 'table' if the required memory allocation is less than or equal to 6 times the sum of the sizes of element and test_elements, otherwise will use 'sort'. This is done to not use a large amount of memory by default, even though 'table' may be faster in most cases. If 'table' is chosen, assume_unique will have no effect.
4870
+
4871
+
kwargs: Any
4872
+
kwargs accepted by the :func:`empty` constructor
4873
+
4874
+
Returns
4875
+
-------
4876
+
isin: blosc2.Array, bool
4877
+
Has the same shape as element. The values element[isin] are in test_elements.
0 commit comments