(val)
return np.isscalar(val)
Returns whether `val` is a scalar value or scalar Tensor.
Returns whether `val` is a scalar value or scalar Tensor.
Returns whether val is a scalar value or scalar Tensor .
def isscalar(val):
  """Returns whether `val` is a scalar value or scalar Tensor."""
  if isinstance(val, (np.ndarray, arrays.ndarray, tf.Tensor)):
    return len(val.shape) == 0  # pylint: disable=g-explicit-length-test
  return np.isscalar(val)
def isscalar ( val ) : if isinstance ( val , ( np . ndarray , arrays . ndarray , tf . Tensor ) ) : return len ( val . shape ) == 0 # pylint: disable=g-explicit-length-test return np . isscalar ( val )