1616from interface import implements
1717from numpy import iinfo , uint32 , multiply
1818
19- from zipline .currency import MISSING_CURRENCY_CODE
2019from zipline .data .fx import ExplodingFXRateReader
2120from zipline .lib .adjusted_array import AdjustedArray
22- from zipline .utils .numpy_utils import (
23- repeat_first_axis ,
24- bytes_array_to_native_str_object_array ,
25- )
21+ from zipline .utils .numpy_utils import repeat_first_axis
2622
2723from .base import PipelineLoader
2824from .utils import shift_dates
@@ -123,12 +119,7 @@ def load_adjusted_array(self, domain, columns, dates, sids, mask):
123119 )
124120
125121 for c in currency_cols :
126- codes_1d = bytes_array_to_native_str_object_array (
127- self .raw_price_reader .currency_codes (sids )
128- )
129- # XXX: Should this just be the contract of `currency_codes`?
130- codes_1d [codes_1d == MISSING_CURRENCY_CODE ] = None
131-
122+ codes_1d = self .raw_price_reader .currency_codes (sids )
132123 codes = repeat_first_axis (codes_1d , len (dates ))
133124 out [c ] = AdjustedArray (
134125 codes ,
@@ -141,8 +132,8 @@ def load_adjusted_array(self, domain, columns, dates, sids, mask):
141132 @property
142133 def currency_aware (self ):
143134 # Tell the pipeline engine that this loader supports currency
144- # conversion.
145- return True
135+ # conversion if we have a non-dummy fx rates reader .
136+ return not isinstance ( self . fx_reader , ExplodingFXRateReader )
146137
147138 def _inplace_currency_convert (self , columns , arrays , dates , sids ):
148139 """
0 commit comments