From 4b897a22f4f95d7e9f2039bd5f47e9c9766d441c Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Thu, 10 Dec 2015 17:19:49 -0500 Subject: [PATCH] MAINT: Use full_like instead of full. --- zipline/pipeline/term.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipline/pipeline/term.py b/zipline/pipeline/term.py index 50e1d285..2498cfc9 100644 --- a/zipline/pipeline/term.py +++ b/zipline/pipeline/term.py @@ -4,7 +4,7 @@ Base class for Filters, Factors and Classifiers from abc import ABCMeta, abstractproperty from weakref import WeakValueDictionary -from numpy import full, dtype as dtype_class +from numpy import full_like, dtype as dtype_class from six import with_metaclass from zipline.errors import ( @@ -275,7 +275,7 @@ class CustomTermMixin(object): # TODO: Make mask available to user's `compute`. compute = self.compute missing_value = self.missing_value - out = full(mask.shape, missing_value, dtype=self.dtype) + out = full_like(mask, missing_value, dtype=self.dtype) with self.ctx: # TODO: Consider pre-filtering columns that are all-nan at each # time-step?