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 ff16029 commit adda002Copy full SHA for adda002
arraycontext/container/__init__.py
@@ -218,7 +218,11 @@ def is_array_container(ary: Any) -> bool:
218
"cheaper option, see is_array_container_type.",
219
DeprecationWarning, stacklevel=2)
220
return (serialize_container.dispatch(ary.__class__)
221
- is not serialize_container.__wrapped__) # type:ignore[attr-defined]
+ is not serialize_container.__wrapped__ # type:ignore[attr-defined]
222
+ # numpy values with scalar elements aren't array containers
223
+ and not (isinstance(ary, np.ndarray)
224
+ and ary.dtype.kind != "O")
225
+ )
226
227
228
@singledispatch
0 commit comments