Changed according to Travis Cl
@@ -63,13 +63,14 @@ def vdot(a, b):
def cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None):
"""Returns the cross product of two vectors.
- The cross product of ``a`` and ``b`` in :math:``R^3`` is a vector perpendicular
- to both ``a`` and ``b``. If ``a`` and ``b`` are arrays of vectors, the vectors
- are defined by the last axis of ``a`` and ``b`` by default, and these axes
- can have dimensions 2 or 3. Where the dimension of either ``a`` or ``b`` is
- 2, the third component of the input vector is assumed to be zero and the
- cross product calculated accordingly. In cases where both input vectors
- have dimension 2, the z-component of the cross product is returned.
+ The cross product of ``a`` and ``b`` in :math:``R^3`` is a vector
+ perpendicular to both ``a`` and ``b``. If ``a`` and ``b`` are arrays
+ of vectors, the vectors are defined by the last axis of ``a`` and ``b``
+ by default, and these axes can have dimensions 2 or 3. Where the
+ dimension of either ``a`` or ``b`` is 2, the third component of the input
+ vector is assumed to be zero and the cross product calculated accordingly.
+ In cases where both input vectors have dimension 2, the z-component of
+ the cross product is returned.
Args:
a : cupy.ndarray
@@ -77,16 +78,19 @@ def cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None):
b : cupy.ndarray
Components of the second vector(s).
axisa : int, optional
- Axis of ``a`` that defines the vector(s). By default, the last axis.
+ Axis of ``a`` that defines the vector(s).
+ By default, the last axis.
axisb : int, optional
- Axis of ``b`` that defines the vector(s). By default, the last axis.
+ Axis of ``b`` that defines the vector(s).
+ By default, the last axis.
axisc : int, optional
Axis of ``c`` containing the cross product vector(s). Ignored if
both input vectors have dimension 2, as the return is scalar.
By default, the last axis.
axis : int, optional
- If defined, the axis of ``a``, ``b`` and ``c`` that defines the vector(s)
- and cross product(s). Overrides ``axisa``, ``axisb`` and ``axisc``.
+ If defined, the axis of ``a``, ``b`` and ``c``
+ that defines the vector(s) and cross product(s).
+ Overrides ``axisa``, ``axisb`` and ``axisc``.
Returns:
c : cupy.ndarray
