We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23d76b4 commit f2b2f9fCopy full SHA for f2b2f9f
1 file changed
xarray/core/variable.py
@@ -346,7 +346,10 @@ def data(self):
346
def data(self, data):
347
data = as_compatible_data(data)
348
if data.shape != self.shape:
349
- raise ValueError("replacement data must match the Variable's shape")
+ raise ValueError(
350
+ f"replacement data must match the Variable's shape. "
351
+ f"replacement data has shape {data.shape}; Variable has shape {self.shape}"
352
+ )
353
self._data = data
354
355
def load(self, **kwargs):
0 commit comments