diff --git a/meshmode/discretization/connection/direct.py b/meshmode/discretization/connection/direct.py index 2dfffc4e..ffbad9b3 100644 --- a/meshmode/discretization/connection/direct.py +++ b/meshmode/discretization/connection/direct.py @@ -596,7 +596,10 @@ def __call__( # {{{ recurse into array containers - if not isinstance(ary, DOFArray): + from numbers import Number + if isinstance(ary, Number): + return ary + elif not isinstance(ary, DOFArray): try: iterable = serialize_container(ary) except NotAnArrayContainerError: