xorbits.numpy.array_equiv#
- xorbits.numpy.array_equiv(a1, a2)#
Returns True if input arrays are shape consistent and all elements equal.
Shape consistent means they are either the same shape, or one input array can be broadcasted to create the same shape as the other one.
- 参数
a1 (array_like) – Input arrays.
a2 (array_like) – Input arrays.
- 返回
out – True if equivalent, False otherwise.
- 返回类型
bool
实际案例
>>> np.array_equiv([1, 2], [1, 2]) True >>> np.array_equiv([1, 2], [1, 3]) False
Showing the shape equivalence:
>>> np.array_equiv([1, 2], [[1, 2], [1, 2]]) True >>> np.array_equiv([1, 2], [[1, 2, 1, 2], [1, 2, 1, 2]]) False
>>> np.array_equiv([1, 2], [[1, 2], [1, 3]]) False
警告
This method has not been implemented yet. Xorbits will try to execute it with numpy.
This docstring was copied from numpy.