Skip to content
forked from pydata/xarray

Commit

Permalink
Add identity check to lazy_array_equiv
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Oct 29, 2019
1 parent 5e742e4 commit 53c0f4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xarray/core/duck_array_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ def lazy_array_equiv(arr1, arr2):
Returns True or False when equality can be determined without computing.
Returns None when equality cannot determined (e.g. one or both of arr1, arr2 are numpy arrays)
"""
if arr1 is arr2:
return True
arr1 = asarray(arr1)
arr2 = asarray(arr2)
if arr1.shape != arr2.shape:
Expand Down

0 comments on commit 53c0f4e

Please sign in to comment.