parameters: (x)
docstring: Returns the dtype of x.
docstring_summary: Returns the dtype of x.
docstring_tokens: Returns the dtype of x .
function: def _get_dtype(x):
      """Returns the dtype of x."""
      if isinstance(x, bool):
          return mstype.bool_
      if isinstance(x, int):
          return mstype.int32
      if isinstance(x, float):
          return mstype.float32
      if isinstance(x, typing.Number):
          return x
      if isinstance(x, str):
          t = dtype_map.get(x, None)
          if t is None:
              t = dtype_map.get(str(nptype(x)))
          return t
      raise TypeError('data type not understood')
function_tokens: def _get_dtype ( x ) : if isinstance ( x , bool ) : return mstype . bool_ if isinstance ( x , int ) : return mstype . int32 if isinstance ( x , float ) : return mstype . float32 if isinstance ( x , typing . Number ) : return x if isinstance ( x , str ) : t = dtype_map . get ( x , None ) if t is None : t = dtype_map . get ( str ( nptype ( x ) ) ) return t raise TypeError ( 'data type not understood' )