code: def fcast(value: float) -> TensorLike:
      
      newvalue = tf.cast(value, FTYPE)
      if DEVICE == 'gpu':
          newvalue = newvalue.gpu()  # Why is this needed?  # pragma: no cover
      return newvalue
docs: Cast to float tensor