'Return the cross product of ``self`` and ``b`` relaxing the condition
of compatible dimensions: if each has 3 elements, a matrix of the
same type and shape as ``self`` will be returned. If ``b`` has the same
shape as ``self`` then common identities for the cross product (like
`a \times b = - b \times a`) will hold.
Parameters
b : 3x1 or 1x3 Matrix
See Also
dot
multiply
multiply_elementwise'

def cross(self, b):

    if (not is_sequence(b)):
        raise TypeError(('`b`    must    be    an    ordered    iterable    or    Matrix,    not    %s.' % type(b)))
    if (not ((self.rows * self.cols) == (b.rows * b.cols) == 3)):
        raise ShapeError(('Dimensions    incorrect    for    cross    product:    %s    x    %s' % ((self.rows, self.cols), (b.rows, b.cols))))
    else:
        return self._new(self.rows, self.cols, (((self[1] * b[2]) - (self[2] * b[1])), ((self[2] * b[0]) - (self[0] * b[2])), ((self[0] * b[1]) - (self[1] * b[0]))))
