mindspore.numpy.array_equal
- mindspore.numpy.array_equal(a1, a2, equal_nan=False)[源代码]
- Returns True if input arrays have same shapes and all elements equal. - 说明 - In mindspore, a bool tensor is returned instead, since in Graph mode, the value cannot be traced and computed at compile time. - Since on Ascend, - nanis treated differently, currently the argument equal_nan is not supported on Ascend.- 参数
- 返回
- Scalar bool tensor, value is True if inputs are equal, False otherwise. 
- 异常
- TypeError – If inputs have types not specified above. 
 - Supported Platforms:
- GPU- CPU- Ascend
 - 样例 - >>> import mindspore.numpy as np >>> a = [0,1,2] >>> b = [[0,1,2], [0,1,2]] >>> print(np.array_equal(a,b)) False