Coverage for tests/test_winMap.py : 36%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# a map describing a shift of [1.0, -0.5] followed by a zoom of 2 winmap = ast.WinMap([0, 0], [1, 1], [1, -0.5], [3, 1.5]) pred_shift = [1.0, -0.5] pred_zoom = 2.0 self.assertIsInstance(winmap, ast.WinMap) self.assertEqual(winmap.nIn, 2) self.assertEqual(winmap.nOut, 2)
self.checkBasicSimplify(winmap) self.checkCopy(winmap)
indata = np.array([ [0.0, 0.5, 1.0], [-3.0, 1.5, 0.13], ], dtype=float) pred_outdata = (indata.T * pred_zoom + pred_shift).T outdata = winmap.applyForward(indata) assert_allclose(outdata, pred_outdata)
self.checkRoundTrip(winmap, indata) self.checkMappingPersistence(winmap, indata)
unittest.main() |