Skip to content

Commit

Permalink
Clarify error message (pydata#2078)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdrussotto committed Jul 13, 2019
1 parent 6586c26 commit 4099cc2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray/core/computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,9 @@ def broadcast_compat_data(variable, broadcast_dims, core_dims):
missing_core_dims = [d for d in core_dims if d not in set_old_dims]
if missing_core_dims:
raise ValueError(
'operand to apply_ufunc has required core dimensions %r, but '
'some of these are missing on the input variable: %r'
% (list(core_dims), missing_core_dims))
'operand to apply_ufunc has required core dimensions {}, but '
'some of these are missing on an input variable: {}'.format(
list(core_dims), missing_core_dims))

set_new_dims = set(new_dims)
unexpected_dims = [d for d in old_dims if d not in set_new_dims]
Expand Down

0 comments on commit 4099cc2

Please sign in to comment.