equal
Test element-wise equality. Inputs are broadcast together.| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | — | First input array. |
x2 | ArrayLike | — | Second input array. |
NDArray — Boolean array where each element is true where x1 == x2.
not_equal
Test element-wise inequality. Inputs are broadcast together.| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | — | First input array. |
x2 | ArrayLike | — | Second input array. |
NDArray — Boolean array where each element is true where x1 != x2.
greater
Test element-wise whetherx1 > x2. Inputs are broadcast together.
| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | — | First input array. |
x2 | ArrayLike | — | Second input array. |
NDArray — Boolean array where each element is true where x1 > x2.
greater_equal
Test element-wise whetherx1 >= x2. Inputs are broadcast together.
| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | — | First input array. |
x2 | ArrayLike | — | Second input array. |
NDArray — Boolean array where each element is true where x1 >= x2.
less
Test element-wise whetherx1 < x2. Inputs are broadcast together.
| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | — | First input array. |
x2 | ArrayLike | — | Second input array. |
NDArray — Boolean array where each element is true where x1 < x2.
less_equal
Test element-wise whetherx1 <= x2. Inputs are broadcast together.
| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | — | First input array. |
x2 | ArrayLike | — | Second input array. |
NDArray — Boolean array where each element is true where x1 <= x2.
allclose
Returntrue if all elements of two arrays are equal within a tolerance.
| Name | Type | Default | Description |
|---|---|---|---|
a | ArrayLike | — | First input array. |
b | ArrayLike | number | — | Second input array. |
rtol | number | 1e-5 | Relative tolerance. |
atol | number | 1e-8 | Absolute tolerance. |
boolean — true if |a - b| <= atol + rtol * |b| for all element pairs.
isclose
Return a boolean array where each element istrue if the corresponding elements of a and b are equal within a tolerance.
| Name | Type | Default | Description |
|---|---|---|---|
a | ArrayLike | — | First input array. |
b | ArrayLike | — | Second input array. |
rtol | number | 1e-5 | Relative tolerance. |
atol | number | 1e-8 | Absolute tolerance. |
equal_nan | boolean | false | If true, two NaN values are considered equal. |
NDArray — Boolean array of element-wise closeness results.
array_equal
Returntrue if two arrays have the same shape and all elements are equal.
| Name | Type | Default | Description |
|---|---|---|---|
a | ArrayLike | — | First input array. |
b | ArrayLike | — | Second input array. |
equal_nan | boolean | false | If true, NaN values compare equal. |
boolean — true if both arrays have the same shape and identical elements.
array_equiv
Returntrue if two arrays are broadcastable to the same shape and all elements are equal after broadcasting.
| Name | Type | Default | Description |
|---|---|---|---|
a | ArrayLike | — | First input array. |
b | ArrayLike | — | Second input array. |
boolean — true if the arrays are shape-compatible (broadcastable) and all corresponding elements are equal.