parameters: (cls, array)
return_statement: return self
docstring: Initiate a new QUAT from an array-like object.
  
          The first axis of the array is assumed to correspond to the elements
          of the algebra, and needs to have the same length. Any other dimensions
          are left unchanged, and should have simple operations such as addition 
          and multiplication defined. NumPy arrays are therefore a perfect 
          candidate. 
  
          :param array: array-like object whose length is the dimension of the algebra.
          :return: new instance of QUAT.
docstring_summary: Initiate a new QUAT from an array-like object.
docstring_tokens: Initiate a new QUAT from an array - like object .
function: def fromarray(cls, array):
          """Initiate a new QUAT from an array-like object.
  
          The first axis of the array is assumed to correspond to the elements
          of the algebra, and needs to have the same length. Any other dimensions
          are left unchanged, and should have simple operations such as addition 
          and multiplication defined. NumPy arrays are therefore a perfect 
          candidate. 
  
          :param array: array-like object whose length is the dimension of the algebra.
          :return: new instance of QUAT.
          """
          self = cls()
          if len(array) != len(self):
              raise TypeError('length of array must be identical to the dimension '
                              'of the algebra.')
          self.mvec = array
          return self
function_tokens: def fromarray ( cls , array ) : self = cls ( ) if len ( array ) != len ( self ) : raise TypeError ( 'length of array must be identical to the dimension ' 'of the algebra.' ) self . mvec = array return self