Exemplo n.º 1
0
def test_full_action_yoav_on_zero():
    neuron = [[0, 0, 0, 1]]
    swap_x_y(neuron)
    rotate(neuron, ROT_X_90)
    translate(neuron, [1, 1, 1])
    np.testing.assert_array_almost_equal([[1, 1, 1, 1]], neuron)
Exemplo n.º 2
0
def test_yoav_rotate_x_in_z():
    coords = [[1, 0, 0, 1]]
    rotate(coords, ROT_Z_90)
    np.testing.assert_array_almost_equal([[0, 1, 0, 1]], coords)
Exemplo n.º 3
0
def test_yoav_rotate_arb():
    coords = [[1, 0.5, 0.1, 1]]
    rotate(coords, ROT_Y_90 + ROT_X_90)
    np.testing.assert_array_almost_equal([[0.1, 1., .5, 1]], coords)
Exemplo n.º 4
0
def test_full_action_yoav_on_something():
    neuron = [[1, 0.5, 0.1, 1]]
    swap_x_y(neuron)
    rotate(neuron, ROT_X_90)
    translate(neuron, [1, 1, 1])
    np.testing.assert_array_almost_equal([[1.5, 0.9, 2, 1]], neuron)