Skip to content

Commit 9f22c41

Browse files
committed
last
1 parent 14cc357 commit 9f22c41

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sparse/_common.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ def tensordot(a, b, axes=2, *, return_type=None):
149149

150150
@njit
151151
def check_nan(a, b, fv1, fv2):
152-
x = a.data
153-
y = b.data
154-
return np.isnan(fv1) or np.isnan(fv2) or np.isnan(np.min(x)) or np.isnan(np.min(y))
152+
return np.isnan(fv1) or np.isnan(fv2) or np.isnan(np.min(a)) or np.isnan(np.min(b))
155153

156154

157155
def matmul(a, b):
@@ -177,7 +175,7 @@ def matmul(a, b):
177175
numpy.matmul : NumPy equivalent function.
178176
COO.__matmul__ : Equivalent function for COO objects.
179177
"""
180-
if check_nan(a, b, a.fill_value, b.fill_value):
178+
if check_nan(a.data, b.data, a.fill_value, b.fill_value):
181179
warnings.warn("Warning: nan is not propagated in matrix multiplication")
182180
check_zero_fill_value(a, b)
183181
if not hasattr(a, "ndim") or not hasattr(b, "ndim"):

0 commit comments

Comments
 (0)