We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dab9bc commit 4374e44Copy full SHA for 4374e44
test/test_arraycontext.py
@@ -1308,6 +1308,16 @@ def test_array_container_with_numpy(actx_factory):
1308
# }}}
1309
1310
1311
+def test_actx_compile_on_pure_array_return(actx_factory):
1312
+ def _twice(x):
1313
+ return 2 * x
1314
+
1315
+ actx = actx_factory()
1316
+ ones = actx.zeros(shape=(10, 4), dtype=np.float64) + 1
1317
+ np.testing.assert_allclose(actx.to_numpy(_twice(ones)),
1318
+ actx.to_numpy(actx.compile(_twice)(ones)))
1319
1320
1321
if __name__ == "__main__":
1322
import sys
1323
if len(sys.argv) > 1:
0 commit comments