Raise dataset shapes in _check_dataset_shapes - Include the mismatching shapes in the Error Message
Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/4f26ccae Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/4f26ccae Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/4f26ccae Branch: refs/heads/master Commit: 4f26ccaefd0dded90b69884129d770c0f52f3627 Parents: a0e5d0b Author: cgoodale <[email protected]> Authored: Mon Jun 23 13:12:08 2014 -0700 Committer: cgoodale <[email protected]> Committed: Mon Jun 23 13:12:08 2014 -0700 ---------------------------------------------------------------------- ocw/dataset_processor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/4f26ccae/ocw/dataset_processor.py ---------------------------------------------------------------------- diff --git a/ocw/dataset_processor.py b/ocw/dataset_processor.py index 0d08699..cd6971c 100644 --- a/ocw/dataset_processor.py +++ b/ocw/dataset_processor.py @@ -725,7 +725,8 @@ def _check_dataset_shapes(datasets): dataset_shape = dataset.values.shape else: if dataset.values.shape != dataset_shape: - raise ValueError("Input datasets must be the same shape for an ensemble") + msg = "%s != %s" % (dataset.values.shape, dataset_shape) + raise ValueError("Input datasets must be the same shape for an ensemble :: ", msg) else: pass
