Beispiel #1
0
 def test_length_batch(self):
     result = vector4.length([
         [1.,1.,1.,1.],
         [-1.,-1.,-1.,1.],
         [0.,2.,7.,1.],
     ])
     expected = [
         2.,
         2.,
         7.34846923,
     ]
     np.testing.assert_almost_equal(result, expected, decimal=5)
Beispiel #2
0
 def test_length_batch(self):
     result = vector4.length([
         [1., 1., 1., 1.],
         [-1., -1., -1., 1.],
         [0., 2., 7., 1.],
     ])
     expected = [
         2.,
         2.,
         7.34846923,
     ]
     np.testing.assert_almost_equal(result, expected, decimal=5)
Beispiel #3
0
 def test_length(self):
     result = vector4.length([1.,1.,1.,1.])
     np.testing.assert_almost_equal(result, 2., decimal=5)
Beispiel #4
0
 def test_length(self):
     result = vector4.length([1., 1., 1., 1.])
     np.testing.assert_almost_equal(result, 2., decimal=5)