mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-09 04:31:00 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user