Skip to content

Commit

Permalink
Merge pull request cupy#6197 from toslunar/4198-4675
Browse files Browse the repository at this point in the history
Fix cupy#4675 on resolving TODO in cupy#4198
  • Loading branch information
asi1024 authored and chainer-ci committed Dec 3, 2021
1 parent e253fcb commit 92300f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cupy/_core/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1191,10 +1191,12 @@ cdef class ndarray:
return numpy.multiply(x, y)

def __matmul__(x, y):
if not isinstance(y, ndarray) and _should_use_rop(x, y):
if isinstance(y, ndarray):
return _linalg.matmul(x, y)
elif _should_use_rop(x, y):
return NotImplemented
else:
return cupy.linalg._product.matmul(x, y)
return numpy.matmul(x, y)

def __div__(x, y):
if isinstance(y, ndarray):
Expand Down

0 comments on commit 92300f2

Please sign in to comment.