dpnp
dpnp copied to clipboard
Logic functions
Need to implement following functions as described here Logic functions
Truth value testing
- [x] all(a[, axis, out, keepdims]) Test whether all array elements along a given axis evaluate to True.
- [x] any(a[, axis, out, keepdims]) Test whether any array element along a given axis evaluates to True.
Array contents
- [x] isfinite(x, /[, out, where, casting, order, …]) Test element-wise for finiteness (not infinity or not Not a Number).
- [x] isinf(x, /[, out, where, casting, order, …]) Test element-wise for positive or negative infinity.
- [x] isnan(x, /[, out, where, casting, order, …]) Test element-wise for NaN and return result as a boolean array.
- [ ] isnat(x, /[, out, where, casting, order, …]) Test element-wise for NaT (not a time) and return result as a boolean array.
- [ ] isneginf(x[, out]) Test element-wise for negative infinity, return result as bool array.
- [ ] isposinf(x[, out]) Test element-wise for positive infinity, return result as bool array.
Array type testing
- [ ] iscomplex(x) Returns a bool array, where True if input element is complex.
- [ ] iscomplexobj(x) Check for a complex type or an array of complex numbers.
- [ ] isfortran(a) Check if the array is Fortran contiguous but not C contiguous.
- [ ] isreal(x) Returns a bool array, where True if input element is real.
- [ ] isrealobj(x) Return True if x is a not complex type or an array of complex numbers.
- [ ] isscalar(element) Returns True if the type of element is a scalar type.
Logical operations
- [x] logical_and(x1, x2, /[, out, where, …]) Compute the truth value of x1 AND x2 element-wise.
- [x] logical_or(x1, x2, /[, out, where, casting, …]) Compute the truth value of x1 OR x2 element-wise.
- [x] logical_not(x, /[, out, where, casting, …]) Compute the truth value of NOT x element-wise.
- [x] logical_xor(x1, x2, /[, out, where, …]) Compute the truth value of x1 XOR x2, element-wise.
Comparison
- [ ] allclose(a, b[, rtol, atol, equal_nan]) Returns True if two arrays are element-wise equal within a tolerance.
- [x] isclose(a, b[, rtol, atol, equal_nan]) Returns a boolean array where two arrays are element-wise equal within a tolerance.
- [ ] array_equal(a1, a2[, equal_nan]) True if two arrays have the same shape and elements, False otherwise.
- [ ] array_equiv(a1, a2) Returns True if input arrays are shape consistent and all elements equal.
- [x] greater(x1, x2, /[, out, where, casting, …]) Return the truth value of (x1 > x2) element-wise.
- [x] greater_equal(x1, x2, /[, out, where, …]) Return the truth value of (x1 >= x2) element-wise.
- [x] less(x1, x2, /[, out, where, casting, …]) Return the truth value of (x1 < x2) element-wise.
- [x] less_equal(x1, x2, /[, out, where, casting, …]) Return the truth value of (x1 =< x2) element-wise.
- [x] equal(x1, x2, /[, out, where, casting, …]) Return (x1 == x2) element-wise.
- [x] not_equal(x1, x2, /[, out, where, casting, …]) Return (x1 != x2) element-wise.