class_docstr: Tests correctness of the floor transformation.
code: def testBijectorEndpointsAtLimit(self):
      # Check that we don't get NaN at half-integer and the floor matches.
      floor = softfloor.Softfloor(self.dtype(1e-5))
      half_integers = np.linspace(0.5, 10.5, 11).astype(self.dtype)
      self.assertAllClose(
          self.evaluate(floor.forward(half_integers)),
          np.floor(half_integers),
      )
      self.assertAllFinite(self.evaluate(floor.inverse(half_integers)))
      # At integer values, check we don't have NaN's, and this is close to
      # integer - 0.5 (which is only true in the limit!).
      integers = np.linspace(0.0, 10.0, 11).astype(self.dtype)
      self.assertAllClose(
          self.evaluate(floor.forward(integers)),
          integers - 0.5,
          rtol=3e-3,
      )
      self.assertAllFinite(self.evaluate(floor.inverse(integers)))
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import softfloor
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.gradient import value_and_gradient
label_desc: Use image node_id 4 for calling the _SoftFloorBijectorBase obj's underlying member method code with example usage: obj.testBijectorEndpointsAtLimit() without return types