tensorflow_probability/python/stats/quantiles.py
def _get_best_effort_ndims(x,
                           expect_ndims=None,
                           expect_ndims_at_least=None,
                           expect_ndims_no_more_than=None):
  """Get static ndims if possible.  Fallback on `tf.rank(x)`."""
  ndims_static = _get_static_ndims(
      x,
      expect_ndims=expect_ndims,
      expect_ndims_at_least=expect_ndims_at_least,
      expect_ndims_no_more_than=expect_ndims_no_more_than)
  if ndims_static is not None:
    return ndims_static
  return tf.rank(x)
def _get_best_effort_ndims(x,
                           expect_ndims=None,
                           expect_ndims_at_least=None,
                           expect_ndims_no_more_than=None):
  """Get static ndims if possible.  Fallback on `tf.rank(x)`."""
  ndims_static = _get_static_ndims(
      x,
      expect_ndims=expect_ndims,
      expect_ndims_at_least=expect_ndims_at_least,
      expect_ndims_no_more_than=expect_ndims_no_more_than)
  if ndims_static is not None:
    return ndims_static
  return tf.rank(x)
def _get_best_effort_ndims ( x , expect_ndims = None , expect_ndims_at_least = None , expect_ndims_no_more_than = None ) : ndims_static = _get_static_ndims ( x , expect_ndims = expect_ndims , expect_ndims_at_least = expect_ndims_at_least , expect_ndims_no_more_than = expect_ndims_no_more_than ) if ndims_static is not None : return ndims_static return tf . rank ( x )
Get static ndims if possible.  Fallback on `tf.rank(x)`.
Get static ndims if possible . Fallback on tf . rank ( x ) .