From ea01fb074a1ed2a9dfbf378441364c9dbb346ad2 Mon Sep 17 00:00:00 2001 From: Gil Wassermann Date: Fri, 22 Jul 2016 16:08:33 -0400 Subject: [PATCH] STY: style changes --- tests/pipeline/test_filter.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/pipeline/test_filter.py b/tests/pipeline/test_filter.py index c2a6673d..6a33c251 100644 --- a/tests/pipeline/test_filter.py +++ b/tests/pipeline/test_filter.py @@ -19,7 +19,7 @@ from numpy import ( ones, ones_like, putmask, - sum, + sum as np_sum ) from numpy.random import randn, seed as random_seed @@ -401,21 +401,16 @@ class FilterTestCase(BasePipelineTestCase): def compute(self, today, assets, out, filter_): # sum for each column - out[:] = sum(filter_, axis=0) + out[:] = np_sum(filter_, axis=0) results = self.run_graph( TermGraph({'windowsafe': TestFactor()}), initial_workspace={InputFilter(): data}, ) - # number of securities in default_shape - securities = self.default_shape[1] - # number of days in default_shape n = self.default_shape[0] # shape of output array - output_shape = ((n - k + 1), securities) - - # assert that these two arrays are the same + output_shape = ((n - k + 1), self.default_shape[1]) check_arrays(results['windowsafe'], full(output_shape, k))