climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [2/6] git commit: Raise dataset shapes in _check_dataset_shapes
Date Mon, 27 Oct 2014 19:16:29 GMT
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 <sigep311@gmail.com>
Authored: Mon Jun 23 13:12:08 2014 -0700
Committer: cgoodale <sigep311@gmail.com>
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
 


Mime
View raw message