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)
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)
def test_length(self): result = vector4.length([1.,1.,1.,1.]) np.testing.assert_almost_equal(result, 2., decimal=5)
def test_length(self): result = vector4.length([1., 1., 1., 1.]) np.testing.assert_almost_equal(result, 2., decimal=5)