From 4ba064dae76cfcedf0822f8b82358b0e7df8b544 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Tue, 26 Jul 2016 13:18:11 -0400 Subject: [PATCH] MAINT: Don't make datetime64 from tz-aware Timestamp. It's slow and deprecated. --- zipline/data/minute_bars.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipline/data/minute_bars.py b/zipline/data/minute_bars.py index 4baae88c..2c7e307f 100644 --- a/zipline/data/minute_bars.py +++ b/zipline/data/minute_bars.py @@ -695,12 +695,12 @@ class BcolzMinuteBarWriter(object): all_minutes = self._minute_index # Get the latest minute we wish to write to the ctable - last_minute_to_write = dts[-1] + last_minute_to_write = pd.Timestamp(dts[-1], tz='UTC') # In the event that we've already written some minutely data to the # ctable, guard against overwriting that data. if num_rec_mins > 0: - last_recorded_minute = np.datetime64(all_minutes[num_rec_mins - 1]) + last_recorded_minute = all_minutes[num_rec_mins - 1] if last_minute_to_write <= last_recorded_minute: raise BcolzMinuteOverlappingData(dedent(""" Data with last_date={0} already includes input start={1} for