(self)
| 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 = ( |
nothing calls this directly
no test coverage detected