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 4699e96 commit c2c1d77Copy full SHA for c2c1d77
test/test_arraycontext.py
@@ -1113,9 +1113,10 @@ def test_flatten_array_container_failure(actx_factory):
1113
ary = _get_test_containers(actx, shapes=512)[0]
1114
flat_ary = _checked_flatten(ary, actx)
1115
1116
- with pytest.raises(TypeError):
1117
- # cannot unflatten from a numpy array
1118
- unflatten(ary, actx.to_numpy(flat_ary), actx)
+ if not isinstance(actx, NumpyArrayContext):
+ with pytest.raises(TypeError):
+ # cannot unflatten from a numpy array (except for numpy actx)
1119
+ unflatten(ary, actx.to_numpy(flat_ary), actx)
1120
1121
with pytest.raises(ValueError):
1122
# cannot unflatten non-flat arrays
0 commit comments