@@ -1367,7 +1367,7 @@ def test_leaf_array_type_broadcasting(actx_factory):
13671367 # test support for https://github.com/inducer/arraycontext/issues/49
13681368 actx = actx_factory ()
13691369
1370- foo = Foo (DOFArray (actx , (actx .zeros (3 , dtype = np .float64 ) + 41 , )))
1370+ foo = Foo (DOFArray (actx , (actx .np . zeros (3 , dtype = np .float64 ) + 41 , )))
13711371 bar = foo + 4
13721372 baz = foo + actx .from_numpy (4 * np .ones ((3 , )))
13731373 qux = actx .from_numpy (4 * np .ones ((3 , ))) + foo
@@ -1510,7 +1510,7 @@ def _twice(x):
15101510
15111511 actx = actx_factory ()
15121512 ones = actx .thaw (actx .freeze (
1513- actx .zeros (shape = (10 , 4 ), dtype = np .float64 ) + 1
1513+ actx .np . zeros (shape = (10 , 4 ), dtype = np .float64 ) + 1
15141514 ))
15151515 np .testing .assert_allclose (actx .to_numpy (_twice (ones )),
15161516 actx .to_numpy (actx .compile (_twice )(ones )))
@@ -1573,7 +1573,7 @@ def test_taggable_cl_array_tags(actx_factory):
15731573def test_to_numpy_on_frozen_arrays (actx_factory ):
15741574 # See https://github.com/inducer/arraycontext/issues/159
15751575 actx = actx_factory ()
1576- u = actx .freeze (actx .zeros (10 , dtype = "float64" )+ 1 )
1576+ u = actx .freeze (actx .np . zeros (10 , dtype = "float64" )+ 1 )
15771577 np .testing .assert_allclose (actx .to_numpy (u ), 1 )
15781578 np .testing .assert_allclose (actx .to_numpy (u ), 1 )
15791579
@@ -1592,7 +1592,7 @@ class ExampleTag(Tag):
15921592 ary = tag_axes (actx , {0 : ExampleTag ()},
15931593 actx .tag (
15941594 ExampleTag (),
1595- actx .zeros ((20 , 20 ), dtype = np .float64 )))
1595+ actx .np . zeros ((20 , 20 ), dtype = np .float64 )))
15961596
15971597 assert ary .tags_of_type (ExampleTag )
15981598 assert ary .axes [0 ].tags_of_type (ExampleTag )
@@ -1606,11 +1606,11 @@ def test_compile_anonymous_function(actx_factory):
16061606 actx = actx_factory ()
16071607 f = actx .compile (lambda x : 2 * x + 40 )
16081608 np .testing .assert_allclose (
1609- actx .to_numpy (f (1 + actx .zeros ((10 , 4 ), "float64" ))),
1609+ actx .to_numpy (f (1 + actx .np . zeros ((10 , 4 ), "float64" ))),
16101610 42 )
16111611 f = actx .compile (partial (lambda x : 2 * x + 40 ))
16121612 np .testing .assert_allclose (
1613- actx .to_numpy (f (1 + actx .zeros ((10 , 4 ), "float64" ))),
1613+ actx .to_numpy (f (1 + actx .np . zeros ((10 , 4 ), "float64" ))),
16141614 42 )
16151615
16161616
0 commit comments