Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C1A3C17CDA for ; Mon, 27 Oct 2014 19:16:28 +0000 (UTC) Received: (qmail 3822 invoked by uid 500); 27 Oct 2014 19:16:28 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 3790 invoked by uid 500); 27 Oct 2014 19:16:28 -0000 Mailing-List: contact commits-help@climate.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.apache.org Delivered-To: mailing list commits@climate.apache.org Received: (qmail 3777 invoked by uid 99); 27 Oct 2014 19:16:28 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Oct 2014 19:16:28 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4B3FA90AD83; Mon, 27 Oct 2014 19:16:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: joyce@apache.org To: commits@climate.apache.org Date: Mon, 27 Oct 2014 19:16:29 -0000 Message-Id: <5122953517af4fbdb6abc6a38ae6a600@git.apache.org> In-Reply-To: <025a2be6a7bc4cf58043be2a24ef5e0f@git.apache.org> References: <025a2be6a7bc4cf58043be2a24ef5e0f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/6] git commit: Raise dataset shapes in _check_dataset_shapes 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 Authored: Mon Jun 23 13:12:08 2014 -0700 Committer: cgoodale 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