parameters: (dtype)
docstring: Get a serializable descriptor from the dtype.
  
      The .descr attribute of a dtype object cannot be round-tripped through
      the dtype() constructor. Simple types, like dtype('float32'), have
      a descr which looks like a record array with one field with '' as
      a name. The dtype() constructor interprets this as a request to give
      a default name.  Instead, we construct descriptor that can be passed to
      dtype().
  
      Parameters
      ----------
      dtype : dtype
          The dtype of the array that will be written to disk.
  
      Returns
      -------
      descr : object
          An object that can be passed to `numpy.dtype()` in order to
          replicate the input dtype.
docstring_summary: Get a serializable descriptor from the dtype.
docstring_tokens: Get a serializable descriptor from the dtype .
function: def dtype_to_descr(dtype):
      """
      Get a serializable descriptor from the dtype.
  
      The .descr attribute of a dtype object cannot be round-tripped through
      the dtype() constructor. Simple types, like dtype('float32'), have
      a descr which looks like a record array with one field with '' as
      a name. The dtype() constructor interprets this as a request to give
      a default name.  Instead, we construct descriptor that can be passed to
      dtype().
  
      Parameters
      ----------
      dtype : dtype
          The dtype of the array that will be written to disk.
  
      Returns
      -------
      descr : object
          An object that can be passed to `numpy.dtype()` in order to
          replicate the input dtype.
  
      """
      if _has_metadata(dtype):
          warnings.warn("metadata on a dtype may be saved or ignored, but will "
                        "raise if saved when read. Use another form of storage.",
                        UserWarning, stacklevel=2)
      if dtype.names is not None:
          # This is a record array. The .descr is fine.  XXX: parts of the
          # record array with an empty name, like padding bytes, still get
          # fiddled with. This needs to be fixed in the C implementation of
          # dtype().
          return dtype.descr
      else:
          return dtype.str
function_tokens: def dtype_to_descr ( dtype ) : if _has_metadata ( dtype ) : warnings . warn ( "metadata on a dtype may be saved or ignored, but will " "raise if saved when read. Use another form of storage." , UserWarning , stacklevel = 2 ) if dtype . names is not None : # This is a record array. The .descr is fine.  XXX: parts of the # record array with an empty name, like padding bytes, still get # fiddled with. This needs to be fixed in the C implementation of # dtype(). return dtype . descr else : return dtype . str