MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / numpy_text

Function numpy_text

tensorflow/python/framework/ops.py:255–265  ·  view source on GitHub ↗

Human readable representation of a tensor's numpy value.

(tensor, is_repr=False)

Source from the content-addressed store, hash-verified

253
254
255def numpy_text(tensor, is_repr=False):
256 """Human readable representation of a tensor's numpy value."""
257 if tensor.dtype.is_numpy_compatible:
258 # pylint: disable=protected-access
259 text = repr(tensor._numpy()) if is_repr else str(tensor._numpy())
260 # pylint: enable=protected-access
261 else:
262 text = "<unprintable>"
263 if "\n" in text:
264 text = "\n" + text
265 return text
266
267@tf_export(v1=["enable_tensor_equality"])
268def enable_tensor_equality():

Callers 2

__str__Method · 0.85
__repr__Method · 0.85

Calls 1

_numpyMethod · 0.80

Tested by

no test coverage detected