[Scipy-svn] r2446 - trunk/Lib/sandbox/timeseries
scipy-svn at scipy.org
scipy-svn at scipy.org
Wed Dec 20 16:53:52 EST 2006
Author: mattknox_ca
Date: 2006-12-20 15:53:48 -0600 (Wed, 20 Dec 2006)
New Revision: 2446
Modified:
trunk/Lib/sandbox/timeseries/timeseries.py
Log:
added reduce, outer, and accumulate to the binary operations
Modified: trunk/Lib/sandbox/timeseries/timeseries.py
===================================================================
--- trunk/Lib/sandbox/timeseries/timeseries.py 2006-12-20 17:18:21 UTC (rev 2445)
+++ trunk/Lib/sandbox/timeseries/timeseries.py 2006-12-20 21:53:48 UTC (rev 2446)
@@ -49,8 +49,21 @@
else:
return self.f(a, b, *args, **kwargs)
-
+ def reduce (self, target, axis=0, dtype=None):
+ """Reduce target along the given axis with this function."""
+
+ return self.f.reduce(target, axis, dtype)
+ def outer (self, a, b):
+ return self.f.outer(a, b)
+
+ def accumulate (self, target, axis=0):
+ return datawrap(self.f.accumulate(target, axis), target)
+
+ def __str__ (self):
+ return "Masked version of " + str(self.f)
+
+
class TimeSeries(ma.MaskedArray):
__array_priority__ = 10.2
More information about the Scipy-svn
mailing list