MCPcopy
hub / github.com/ibab/tensorflow-wavenet / testEncodeNegativeChannelSize

Method testEncodeNegativeChannelSize

test/test_mu_law.py:180–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

178 self.assertAllEqual(manual_encode, encode)
179
180 def testEncodeNegativeChannelSize(self):
181 np.random.seed(1944) # For repeatability of test.
182
183 channels = -256
184 number_of_samples = 1024
185 x = np.zeros(number_of_samples).astype(np.float32)
186 manual_encode = manual_mu_law_encode(x, channels)
187
188 with self.test_session() as sess:
189 self.assertRaises(TypeError, sess.run(mu_law_encode(x, channels)))
190
191 def testDecodeUniformRandomNoise(self):
192 np.random.seed(1944) # For repeatability of test.

Callers

nothing calls this directly

Calls 2

mu_law_encodeFunction · 0.90
manual_mu_law_encodeFunction · 0.85

Tested by

no test coverage detected