I have two NumPy ndarrays a
and b
. I want to check if they are equal as if a=b.copy()
. However, if I use the ==
operator it returns an element-wise list of True
or False
. I want a binary answer, i.e. if all the elements are equal in terms of value, type, etc then a single True
should be returned else False
. Is there an operator in NumPy to achieve this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…