(dtype)
return np.dtype(dtype)
Converts a native python or TF DType to numpy type.

  Args:
    dtype: Could be a python type, a numpy type or a TF DType.

  Returns:
    A NumPy `dtype`.
Converts a native python or TF DType to numpy type.
Converts a native python or TF DType to numpy type .
def _to_numpy_type(dtype):
  """Converts a native python or TF DType to numpy type.

  Args:
    dtype: Could be a python type, a numpy type or a TF DType.

  Returns:
    A NumPy `dtype`.
  """
  if isinstance(dtype, tf.DType):
    return dtype.as_numpy_dtype
  return np.dtype(dtype)
def _to_numpy_type ( dtype ) : if isinstance ( dtype , tf . DType ) : return dtype . as_numpy_dtype return np . dtype ( dtype )