Added suggested fixes
@@ -7,7 +7,7 @@ from cupy import internal
from cupy.linalg.solve import inv
from cupy.util import collections_abc
-from cupy.util import _normalize_axis_index
+from cupy import util
matmul = core.matmul
@@ -103,8 +103,8 @@ def cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None):
a = cupy.asarray(a)
b = cupy.asarray(b)
# Check axisa and axisb are within bounds
- axisa = _normalize_axis_index(axisa, a.ndim)
- axisb = _normalize_axis_index(axisb, b.ndim)
+ axisa = util._normalize_axis_index(axisa, a.ndim)
+ axisb = util._normalize_axis_index(axisb, b.ndim)
# Move working axis to the end of the shape
a = cupy.moveaxis(a, axisa, -1)
@@ -119,7 +119,7 @@ def cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None):
if a.shape[-1] == 3 or b.shape[-1] == 3:
shape += (3,)
# Check axisc is within bounds
- axisc = _normalize_axis_index(axisc, len(shape))
+ axisc = util._normalize_axis_index(axisc, len(shape))
dtype = cupy.promote_types(a.dtype, b.dtype)
cp = cupy.empty(shape, dtype)
