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

Method testShape

tensorflow/compiler/xla/python/xla_client_test.py:580–585  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

578 np.array([2, 3, 4, 5], dtype=np.int32), array1.to_py())
579
580 def testShape(self):
581 pyval = np.array([[1., 2.]], np.float32)
582 local_buffer = xla_client.Buffer.from_pyval(pyval)
583 xla_shape = local_buffer.shape()
584 self.assertEqual(xla_shape.dimensions(), (1, 2))
585 self.assertEqual(np.dtype(xla_shape.element_type()), np.dtype(np.float32))
586
587 def testTupleShape(self):
588 t = (

Callers

nothing calls this directly

Calls 5

from_pyvalMethod · 0.45
shapeMethod · 0.45
dimensionsMethod · 0.45
dtypeMethod · 0.45
element_typeMethod · 0.45

Tested by

no test coverage detected