PERF: Use np.empty instead of np.ones.

No reason to use ones when we multiply everything by NaN immediately.
This commit is contained in:
Scott Sanderson
2014-10-18 16:49:27 -04:00
parent 7104725e3c
commit 76c32f2940
+1 -1
View File
@@ -366,7 +366,7 @@ class HistoryContainer(object):
Create a DataFrame from the given BarData and algo dt.
"""
data = data._data
frame_data = np.ones((len(self.fields), len(self.sids))) * np.nan
frame_data = np.empty((len(self.fields), len(self.sids))) * np.nan
for j, sid in enumerate(self.sids):
sid_data = data.get(sid)