From 59dcf0f6cd95f1a2d0f71746645c4f70f553724a Mon Sep 17 00:00:00 2001 From: fawce Date: Wed, 1 May 2013 22:05:06 -0400 Subject: [PATCH] exposes stateful transform's window length --- zipline/transforms/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zipline/transforms/utils.py b/zipline/transforms/utils.py index 59f40cb8..d1f88007 100644 --- a/zipline/transforms/utils.py +++ b/zipline/transforms/utils.py @@ -121,7 +121,8 @@ class StatefulTransform(object): # Normal object instantiation. else: self.state = tnfm_class(*args, **kwargs) - + # save the window_length of the state for external access. + self.window_length = self.state.window_length # Create the string associated with this generator's output. self.namestring = tnfm_class.__name__ + hash_args(*args, **kwargs)