You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/09/10 18:14:35 UTC
svn commit: r1521538 - /incubator/climate/trunk/ocw/metrics.py
Author: joyce
Date: Tue Sep 10 16:14:35 2013
New Revision: 1521538
URL: http://svn.apache.org/r1521538
Log:
CLIMATE-284 - Remove Metric Base Class
Modified:
incubator/climate/trunk/ocw/metrics.py
Modified: incubator/climate/trunk/ocw/metrics.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw/metrics.py?rev=1521538&r1=1521537&r2=1521538&view=diff
==============================================================================
--- incubator/climate/trunk/ocw/metrics.py (original)
+++ incubator/climate/trunk/ocw/metrics.py Tue Sep 10 16:14:35 2013
@@ -22,35 +22,6 @@ Classes:
from abc import ABCMeta, abstractmethod
-class Metric():
- '''Abstrace Base Class from which all metrics must inherit.'''
- __metaclass__ = ABCMeta
-
- def __init__(self, unary=False):
- '''Default constructor for a Metric.
-
- :param unary: Flag marking if the metric expects one or two operands.
- A "unary" metric processes only a single dataset at a time.
- By default a metric is expected to take two datasets.
- :type unary: Bool
- '''
- self.is_unary = unary
-
- @abstractmethod
- def run(self, datasets):
- '''Run the metric for some given dataset(s)
-
- :param datasets: The dataset(s) to be used in the current metric
- run. If this is a "unary" metric then datasets[0] contains
- the dataset to be used in the current run. If the metric is
- binary, then datasets[0] contains the reference dataset and
- datasets[1] contains the target dataset.
- :type datasets: Tuple
- :returns: An Array containing the results of running the metric.
- :trype: Numpy Array
- '''
-
-
class UnaryMetric():
'''Abstract Base Class from which all unary metrics inherit.'''
__metaclass__ = ABCMeta