Removed unwanted whitespaces
@@ -58,6 +58,7 @@ def vdot(a, b):
return core.tensordot_core(a, b, None, 1, 1, a.size, ())
+
def cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None):
"""Returns the cross product of two vectors.
@@ -101,8 +102,10 @@ 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 = numpy.polynomial.chebyshev.normalize_axis_index(axisa, a.ndim, msg_prefix='axisa')
- axisb = numpy.polynomial.chebyshev.normalize_axis_index(axisb, b.ndim, msg_prefix='axisb')
+ axisa = numpy.polynomial.chebyshev.normalize_axis_index(axisa, a.ndim, \
+ msg_prefix='axisa')
+ axisb = numpy.polynomial.chebyshev.normalize_axis_index(axisb, b.ndim, \
+ msg_prefix='axisb')
# Move working axis to the end of the shape
a = cupy.moveaxis(a, axisa, -1)
@@ -179,6 +182,7 @@ def cross(a, b, axisa = -1, axisb = -1, axisc = -1, axis = None):
return cupy.moveaxis(cp, -1, axisc)
+
def inner(a, b):
"""Returns the inner product of two arrays.
