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