mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-29 12:05:54 +08:00
MAINT: Use coerce_string in BcolzDailyBarReader.
This commit is contained in:
@@ -23,6 +23,7 @@ import sqlite3
|
||||
from bcolz import (
|
||||
carray,
|
||||
ctable,
|
||||
open as open_ctable,
|
||||
)
|
||||
from click import progressbar
|
||||
from numpy import (
|
||||
@@ -364,9 +365,8 @@ class BcolzDailyBarReader(object):
|
||||
We use calendar_offset and calendar to orient loaded blocks within a
|
||||
range of queried dates.
|
||||
"""
|
||||
@preprocess(table=coerce_string(open_ctable, mode='r'))
|
||||
def __init__(self, table):
|
||||
if isinstance(table, string_types):
|
||||
table = ctable(rootdir=table, mode='r')
|
||||
|
||||
self._table = table
|
||||
self._calendar = DatetimeIndex(table.attrs['calendar'], tz='UTC')
|
||||
|
||||
Reference in New Issue
Block a user