parameters: (array)
docstring: Returns the shape (dimensions) of an array.
docstring_summary: Returns the shape (dimensions) of an array.
docstring_tokens: Returns the shape ( dimensions ) of an array .
function: def shape(array):
      "Returns the shape (dimensions) of an array."
      if type(array) == dsa.VTKCompositeDataArray:
          shp = None
          for a in array.Arrays:
              if a is not dsa.NoneArray:
                  if shp is None:
                      shp = list(a.shape)
                  else:
                      tmp = a.shape
                      if (len(shp) != len(tmp)):
                          raise ValueError("Expected arrays of same shape")
                      shp[0] += tmp[0]
                      for idx in range(1,len(tmp)):
                          if shp[idx] != tmp[idx]:
                              raise ValueError("Expected arrays of same shape")
          return tuple(shp)
      elif array is dsa.NoneArray:
          return ()
      else:
          return numpy.shape(array)
function_tokens: def shape ( array ) : if type ( array ) == dsa . VTKCompositeDataArray : shp = None for a in array . Arrays : if a is not dsa . NoneArray : if shp is None : shp = list ( a . shape ) else : tmp = a . shape if ( len ( shp ) != len ( tmp ) ) : raise ValueError ( "Expected arrays of same shape" ) shp [ 0 ] += tmp [ 0 ] for idx in range ( 1 , len ( tmp ) ) : if shp [ idx ] != tmp [ idx ] : raise ValueError ( "Expected arrays of same shape" ) return tuple ( shp ) elif array is dsa . NoneArray : return ( ) else : return numpy . shape ( array )