Exemplo n.º 1
0
 def test_single_loop(self):
     data = np.array([[0, 1, 0, 2], [1, 0, 3, 4]], dtype=float)
     projection = ComplexLogProjection(LatLng(0, 0), LatLng(10, 10),
                                       math.pi / 4)
     center = np.array([[5], [6]], dtype=float)
     projected = projection._single_forward(data.copy(), center, 1, 1)
     back = projection._single_backward(projected, center, 1, 1)
     np.testing.assert_almost_equal(back, data)
Exemplo n.º 2
0
 def test_single_example(self):
     projection = ComplexLogProjection(LatLng(0, 0), LatLng(10, 10),
                                       math.pi / 4)
     data = np.array([[1, 45, 0, -45], [1, 0, 45, 45]])
     center = np.array([[0], [0]])
     projection._single_forward(data, center, math.pi, 1)