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

Method testRFFT

tensorflow/python/kernel_tests/py_func_test.py:121–129  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

119 self.assertAllClose(z, np_func(1 + 2j, 3 + 4j))
120
121 def testRFFT(self):
122 with self.cached_session():
123 x = constant_op.constant([1., 2., 3., 4.], dtypes.float32)
124
125 def rfft(x):
126 return np.fft.rfft(x).astype(np.complex64)
127
128 y = self.evaluate(script_ops.py_func(rfft, [x], dtypes.complex64))
129 self.assertAllClose(y, np.fft.rfft([1., 2., 3., 4.]))
130
131 def testPythonLiteral(self):
132 with self.cached_session():

Callers

nothing calls this directly

Calls 5

rfftMethod · 0.80
cached_sessionMethod · 0.45
constantMethod · 0.45
evaluateMethod · 0.45
assertAllCloseMethod · 0.45

Tested by

no test coverage detected