def canonical_numeric_dtype(dtype):
  """Returns int64 for int dtypes and float32 for float dtypes."""
  if dtype.is_floating:
    return tf.float32
  elif dtype.is_integer:
    return tf.int64
  else:
    raise ValueError('Bad dtype {}'.format(dtype))
Returns int64 for int dtypes and float32 for float dtypes.
tensorflow_transform/beam/tft_unit.py