def load_raw_arrays(self, columns, start_date, end_date, assets):
        """
        Parameters
        ----------
        fields : list of str
            'sid'
        start_dt: Timestamp
           Beginning of the window range.
        end_dt: Timestamp
           End of the window range.
        sids : list of int
           The asset identifiers in the window.

        Returns
        -------
        list of np.ndarray
            A list with an entry per field of ndarrays with shape
            (minutes in range, sids) with a dtype of float64, containing the
            values for the respective field over start and end dt range.
        """
        rolls_by_asset = {}
        for asset in assets:
            rf = self._roll_finders[asset.roll_style]
            rolls_by_asset[asset] = rf.get_rolls(
                asset.root_symbol,
                start_date,
                end_date,
                asset.offset
            )

        num_sessions = len(
            self.trading_calendar.sessions_in_range(start_date, end_date)
        )
        shape = num_sessions, len(assets)

        results = []

        tc = self._bar_reader.trading_calendar
        sessions = tc.sessions_in_range(start_date, end_date)

        # Get partitions
        partitions_by_asset = {}
        for asset in assets:
            partitions = []
            partitions_by_asset[asset] = partitions

            rolls = rolls_by_asset[asset]
            start = start_date

            for roll in rolls:
                sid, roll_date = roll
                start_loc = sessions.get_loc(start)

                if roll_date is not None:
                    end = roll_date - sessions.freq
                    end_loc = sessions.get_loc(end)
                else:
                    end = end_date
                    end_loc = len(sessions) - 1

                partitions.append((sid, start, end, start_loc, end_loc))

                if roll_date is not None:
                    start = sessions[end_loc + 1]

        for column in columns:
            if column != 'volume' and column != 'sid':
                out = np.full(shape, np.nan)
            else:
                out = np.zeros(shape, dtype=np.int64)

            for i, asset in enumerate(assets):
                partitions = partitions_by_asset[asset]

                for sid, start, end, start_loc, end_loc in partitions:
                    if column != 'sid':
                        result = self._bar_reader.load_raw_arrays(
                            [column], start, end, [sid])[0][:, 0]
                    else:
                        result = int(sid)
                    out[start_loc:end_loc + 1, i] = result

            results.append(out)

        return results
def load_raw_arrays ( self , columns , start_date , end_date , assets ) : rolls_by_asset = { } for asset in assets : rf = self . _roll_finders [ asset . roll_style ] rolls_by_asset [ asset ] = rf . get_rolls ( asset . root_symbol , start_date , end_date , asset . offset ) num_sessions = len ( self . trading_calendar . sessions_in_range ( start_date , end_date ) ) shape = num_sessions , len ( assets ) results = [ ] tc = self . _bar_reader . trading_calendar sessions = tc . sessions_in_range ( start_date , end_date ) partitions_by_asset = { } for asset in assets : partitions = [ ] partitions_by_asset [ asset ] = partitions rolls = rolls_by_asset [ asset ] start = start_date for roll in rolls : sid , roll_date = roll start_loc = sessions . get_loc ( start ) if roll_date is not None : end = roll_date - sessions . freq end_loc = sessions . get_loc ( end ) else : end = end_date end_loc = len ( sessions ) - 1 partitions . append ( ( sid , start , end , start_loc , end_loc ) ) if roll_date is not None : start = sessions [ end_loc + 1 ] for column in columns : if column != 'volume' and column != 'sid' : out = np . full ( shape , np . nan ) else : out = np . zeros ( shape , dtype = np . int64 ) for i , asset in enumerate ( assets ) : partitions = partitions_by_asset [ asset ] for sid , start , end , start_loc , end_loc in partitions : if column != 'sid' : result = self . _bar_reader . load_raw_arrays ( [ column ] , start , end , [ sid ] ) [ 0 ] [ : , 0 ] else : result = int ( sid ) out [ start_loc : end_loc + 1 , i ] = result results . append ( out ) return results
Parameters
        ----------
        fields : list of str
            'sid'
        start_dt: Timestamp
           Beginning of the window range.
        end_dt: Timestamp
           End of the window range.
        sids : list of int
           The asset identifiers in the window.

        Returns
        -------
        list of np.ndarray
            A list with an entry per field of ndarrays with shape
            (minutes in range, sids) with a dtype of float64, containing the
            values for the respective field over start and end dt range.