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

Method test_numpyIsView

tensorflow/python/eager/tensor_test.py:376–379  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

374 constant_op.constant(t.min, dtype=t).numpy(), t.min)
375
376 def test_numpyIsView(self):
377 t = constant_op.constant([0.0])
378 t._numpy()[0] = 42.0
379 self.assertAllClose(t, constant_op.constant([42.0]))
380
381 def test_numpyFailsForResource(self):
382 v = variables.Variable(42)

Callers

nothing calls this directly

Calls 3

_numpyMethod · 0.80
constantMethod · 0.45
assertAllCloseMethod · 0.45

Tested by

no test coverage detected