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

Function convert

tensorflow/compiler/xla/python/xla_client.py:435–439  ·  view source on GitHub ↗
(pyval)

Source from the content-addressed store, hash-verified

433 """Returns a Shape that describes a tuple-tree of Numpy arrays."""
434
435 def convert(pyval):
436 if isinstance(pyval, tuple):
437 return Shape.tuple_shape(tuple(convert(elt) for elt in pyval))
438 else:
439 return Shape.array_shape(pyval.dtype, np.shape(pyval))
440
441 return convert(pyval)
442

Callers 8

shape_from_pyvalFunction · 0.70
fnMethod · 0.50
GetEnvVarFunction · 0.50

Calls 2

tupleFunction · 0.85
shapeMethod · 0.45

Tested by 6

fnMethod · 0.40