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 9636F103F8 for ; Wed, 19 Nov 2014 16:53:17 +0000 (UTC) Received: (qmail 58571 invoked by uid 500); 19 Nov 2014 16:53:17 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 58495 invoked by uid 500); 19 Nov 2014 16:53:17 -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 58136 invoked by uid 99); 19 Nov 2014 16:53:17 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2014 16:53:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E782D9ABB44; Wed, 19 Nov 2014 16:53:16 +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: Wed, 19 Nov 2014 16:53:24 -0000 Message-Id: In-Reply-To: <999d83cf6c7141a6b879a6e2183654bb@git.apache.org> References: <999d83cf6c7141a6b879a6e2183654bb@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [09/21] climate git commit: CLIMATE-558 - Update dataset module documentation links CLIMATE-558 - Update dataset module documentation links Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/cdf6c130 Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/cdf6c130 Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/cdf6c130 Branch: refs/heads/master Commit: cdf6c1305a6725089e7170543b1db4bced163b32 Parents: 544fab0 Author: Michael Joyce Authored: Mon Nov 17 10:42:42 2014 -0800 Committer: Michael Joyce Committed: Mon Nov 17 10:42:42 2014 -0800 ---------------------------------------------------------------------- ocw/dataset.py | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/cdf6c130/ocw/dataset.py ---------------------------------------------------------------------- diff --git a/ocw/dataset.py b/ocw/dataset.py index 6cb5e24..1d4b2d8 100644 --- a/ocw/dataset.py +++ b/ocw/dataset.py @@ -39,19 +39,24 @@ class Dataset: '''Default Dataset constructor :param lats: One dimensional numpy array of unique latitude values. - :type lats: numpy array + :type lats: :class:`numpy.ndarray` + :param lons: One dimensional numpy array of unique longitude values. - :type lons: numpy array + :type lons: :class:`numpy.ndarray` + :param times: One dimensional numpy array of unique python datetime objects. - :type times: numpy array + :type times: :class:`numpy.ndarray` + :param values: Three dimensional numpy array of parameter values with shape [timesLength, latsLength, lonsLength]. - :type values: numpy array + :type values: :class:`numpy.ndarray` + :param variable: Name of the value variable. - :type variable: string + :type variable: :mod:`string` + :param name: An optional string name for the Dataset. - :type variable: string + :type name: :mod:`string` :raises: ValueError ''' @@ -70,7 +75,8 @@ class Dataset: :returns: The Dataset's bounding latitude and longitude values as a tuple in the form (min_lat, max_lat, min_lon, max_lon) - :rtype: (float, float, float, float) + :rtype: :func:`tuple` of the form (:class:`float`, :class:`float`, + :class:`float`, :class:`float`). ''' return (float(min(self.lats)), float(max(self.lats)), @@ -82,7 +88,8 @@ class Dataset: :returns: The start and end date of the Dataset's temporal range as a tuple in the form (start_time, end_time). - :rtype: (datetime, datetime) + :rtype: :func:`tuple` of the form (:class:`datetime.datetime`, + :class:`datetime.datetime`) ''' sorted_time = numpy.sort(self.times) start_time = sorted_time[0] @@ -98,7 +105,7 @@ class Dataset: :returns: The Dataset's latitudinal and longitudinal spatial resolution as a tuple of the form (lat_resolution, lon_resolution). - :rtype: (float, float) + :rtype: (:class:`float`, :class:`float`) ''' sorted_lats = numpy.sort(list(set(self.lats))) sorted_lons = numpy.sort(list(set(self.lons))) @@ -115,7 +122,7 @@ class Dataset: list of times is an unrecognized value a ValueError is raised. :returns: The temporal resolution. - :rtype: string + :rtype: :mod:`string` ''' sorted_times = numpy.sort(self.times) time_resolution = sorted_times[1] - sorted_times[0] @@ -221,22 +228,22 @@ class Bounds(object): '''Default Bounds constructor :param lat_min: The minimum latitude bound. - :type lat_min: float + :type lat_min: :class:`float` :param lat_max: The maximum latitude bound. - :type lat_max: float + :type lat_max: :class:`float` :param lon_min: The minimum longitude bound. - :type lon_min: float + :type lon_min: :class:`float` :param lon_max: The maximum longitude bound. - :type lon_max: float + :type lon_max: :class:`float` :param start: The starting datetime bound. - :type start: datetime + :type start: :class:`datetime.datetime` :param end: The ending datetime bound. - :type end: datetime + :type end: :class:`datetime.datetime` :raises: ValueError '''