File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
from os .path import join as pjoin
2
2
3
3
import numpy as np
4
- from numpy .testing import assert_array_almost_equal
4
+ from numpy .testing import assert_array_almost_equal , assert_array_equal
5
5
6
6
from surfer import utils
7
7
@@ -51,6 +51,16 @@ def test_surface():
51
51
assert_array_almost_equal (x + 2 , x_ )
52
52
53
53
# normals
54
- nn = _slow_compute_normals (surface .coords , surface .faces [:100 ])
55
- nn_fast = utils ._compute_normals (surface .coords , surface .faces [:100 ])
54
+ nn = _slow_compute_normals (surface .coords , surface .faces [:10000 ])
55
+ nn_fast = utils ._compute_normals (surface .coords , surface .faces [:10000 ])
56
56
assert_array_almost_equal (nn , nn_fast )
57
+
58
+
59
+ def test_huge_cross ():
60
+ """Test cross product with lots of elements
61
+ """
62
+ x = np .random .rand (100000 , 3 )
63
+ y = np .random .rand (1 , 3 )
64
+ z = np .cross (x , y )
65
+ zz = utils ._fast_cross_3d (x , y )
66
+ assert_array_equal (z , zz )
You can’t perform that action at this time.
0 commit comments