Skip to content

Commit ca080a9

Browse files
Potential fix for issue astropy#10170
1 parent 4a94fc8 commit ca080a9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎astropy/modeling/core.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3914,10 +3914,13 @@ def _prepare_inputs_single_model(model, params, inputs, **kwargs):
39143914

39153915

39163916
def _prepare_outputs_single_model(outputs, format_info):
3917-
broadcasts = format_info[0]
39183917
outputs = list(outputs)
39193918
for idx, output in enumerate(outputs):
3920-
broadcast_shape = broadcasts[idx]
3919+
try:
3920+
broadcast_shape = check_broadcast(*format_info[idx])
3921+
except:
3922+
broadcast_shape = format_info[0][idx]
3923+
39213924
if broadcast_shape is not None:
39223925
if not broadcast_shape:
39233926
# Shape is (), i.e. a scalar should be returned

0 commit comments

Comments
 (0)