Check if two numpy arrays are identical

前端 未结 7 990
轻奢々
轻奢々 2020-12-10 15:47

Suppose I have a bunch of arrays, including x and y, and I want to check if they\'re equal. Generally, I can just use np.all(x == y) (

7条回答
  •  旧巷少年郎
    2020-12-10 16:43

    As Thomas Kühn wrote in a comment to your post, array_equal is a function which should solve the problem. It is described in Numpy's API reference.

提交回复
热议问题