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

Method testNe

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

Source from the content-addressed store, hash-verified

1081 self._ExecuteAndCompareExact(c, expected=[False, True, True, False])
1082
1083 def testNe(self):
1084 c = self._NewComputation()
1085 c.Ne(
1086 c.Constant(NumpyArrayS32([1, 2, 3, 4])),
1087 c.Constant(NumpyArrayS32([4, 2, 3, 1])))
1088 self._ExecuteAndCompareExact(c, expected=[True, False, False, True])
1089
1090 c.Ne(
1091 c.Constant(NumpyArrayF32([-2.0, 0.0,
1092 float("nan"),
1093 float("nan")])),
1094 c.Constant(NumpyArrayF32([2.0, -0.0, 1.0, float("nan")])))
1095 self._ExecuteAndAssertWith(
1096 np.testing.assert_allclose, c, (), expected=[True, False, True, True])
1097
1098 def testGt(self):
1099 c = self._NewComputation()

Callers

nothing calls this directly

Calls 6

NumpyArrayS32Function · 0.85
NumpyArrayF32Function · 0.85
_NewComputationMethod · 0.80
_ExecuteAndAssertWithMethod · 0.80
ConstantMethod · 0.45

Tested by

no test coverage detected