parameters: (numpy_array_type)
docstring: Returns a VTK typecode given a numpy array.
docstring_summary: Returns a VTK typecode given a numpy array.
docstring_tokens: Returns a VTK typecode given a numpy array .
function: def get_vtk_array_type(numpy_array_type):
      """Returns a VTK typecode given a numpy array."""
      # This is a Mapping from numpy array types to VTK array types.
      _np_vtk = {numpy.uint8:vtkConstants.VTK_UNSIGNED_CHAR,
                  numpy.uint16:vtkConstants.VTK_UNSIGNED_SHORT,
                  numpy.uint32:vtkConstants.VTK_UNSIGNED_INT,
                  numpy.uint64:vtkConstants.VTK_UNSIGNED_LONG_LONG,
                  numpy.int8:vtkConstants.VTK_CHAR,
                  numpy.int16:vtkConstants.VTK_SHORT,
                  numpy.int32:vtkConstants.VTK_INT,
                  numpy.int64:vtkConstants.VTK_LONG_LONG,
                  numpy.float32:vtkConstants.VTK_FLOAT,
                  numpy.float64:vtkConstants.VTK_DOUBLE,
                  numpy.complex64:vtkConstants.VTK_FLOAT,
                  numpy.complex128:vtkConstants.VTK_DOUBLE}
      for key, vtk_type in _np_vtk.items():
          if numpy_array_type == key or \
             numpy.issubdtype(numpy_array_type, key) or \
             numpy_array_type == numpy.dtype(key):
              return vtk_type
      raise TypeError(
          'Could not find a suitable VTK type for %s' % (str(numpy_array_type)))
function_tokens: def get_vtk_array_type ( numpy_array_type ) : # This is a Mapping from numpy array types to VTK array types. _np_vtk = { numpy . uint8 : vtkConstants . VTK_UNSIGNED_CHAR , numpy . uint16 : vtkConstants . VTK_UNSIGNED_SHORT , numpy . uint32 : vtkConstants . VTK_UNSIGNED_INT , numpy . uint64 : vtkConstants . VTK_UNSIGNED_LONG_LONG , numpy . int8 : vtkConstants . VTK_CHAR , numpy . int16 : vtkConstants . VTK_SHORT , numpy . int32 : vtkConstants . VTK_INT , numpy . int64 : vtkConstants . VTK_LONG_LONG , numpy . float32 : vtkConstants . VTK_FLOAT , numpy . float64 : vtkConstants . VTK_DOUBLE , numpy . complex64 : vtkConstants . VTK_FLOAT , numpy . complex128 : vtkConstants . VTK_DOUBLE } for key , vtk_type in _np_vtk . items ( ) : if numpy_array_type == key or numpy . issubdtype ( numpy_array_type , key ) or numpy_array_type == numpy . dtype ( key ) : return vtk_type raise TypeError ( 'Could not find a suitable VTK type for %s' % ( str ( numpy_array_type ) ) )