Skip to content

Commit

Permalink
allow passing scalars to DirectDiscretizationConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
majosm authored and inducer committed Mar 6, 2024
1 parent 972586d commit 3c38a48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion meshmode/discretization/connection/direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3c38a48

Please sign in to comment.