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

Method _OpError

tensorflow/python/kernel_tests/cast_op_test.py:187–190  ·  view source on GitHub ↗
(self, x, dtype, err)

Source from the content-addressed store, hash-verified

185 self.assertAllEqual(np.isnan(self._cast(np.nan, np.float64, True)), True)
186
187 def _OpError(self, x, dtype, err):
188 with self.cached_session():
189 with self.assertRaisesOpError(err):
190 math_ops.cast(x, dtype).eval()
191
192 def testNotImplemented(self):
193 self._OpError(np.arange(0, 10), dtypes.string, "Cast.*int64.*string.*")

Callers 1

testNotImplementedMethod · 0.95

Calls 4

assertRaisesOpErrorMethod · 0.80
cached_sessionMethod · 0.45
evalMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected