Skip to content

Commit

Permalink
#1429 fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Mar 27, 2021
1 parent 2a7ed06 commit f0a4ddc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pybamm/expression_tree/binary_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,9 @@ def unpack_broadcast_recursive(symbol):
isinstance(symbol.child, pybamm.Broadcast)
and symbol.child.broadcasts_to_nodes
):
return unpack_broadcast_recursive(symbol.child)
out = unpack_broadcast_recursive(symbol.orphans[0])
if out.domain == []:
return out
return symbol

# No need to broadcast if the other symbol already has the shape that is being
Expand Down

0 comments on commit f0a4ddc

Please sign in to comment.