コード例 #1
0
ファイル: array.py プロジェクト: Goutham2591/OMK_PART2
    def _get_val_at(self, loc):
        n = len(self)
        if loc < 0:
            loc += n

        if loc >= n or loc < 0:
            raise IndexError('Out of bounds access')

        sp_loc = self.sp_index.lookup(loc)
        if sp_loc == -1:
            return self.fill_value
        else:
            return libindex.get_value_at(self, sp_loc)
コード例 #2
0
ファイル: array.py プロジェクト: rajasankar-ideas2it/pandas
    def _get_val_at(self, loc):
        n = len(self)
        if loc < 0:
            loc += n

        if loc >= n or loc < 0:
            raise IndexError('Out of bounds access')

        sp_loc = self.sp_index.lookup(loc)
        if sp_loc == -1:
            return self.fill_value
        else:
            return libindex.get_value_at(self, sp_loc)
コード例 #3
0
    def _get_val_at(self, loc):
        n = len(self)
        if loc < 0:
            loc += n

        if loc >= n or loc < 0:
            raise IndexError('Out of bounds access')

        sp_loc = self.sp_index.lookup(loc)
        if sp_loc == -1:
            return self.fill_value
        else:
            # libindex.get_value_at will end up calling __getitem__,
            # so to avoid recursing we need to unwrap `self` so the
            # ndarray.__getitem__ implementation is called.
            return libindex.get_value_at(np.asarray(self), sp_loc)
コード例 #4
0
ファイル: array.py プロジェクト: Michael-E-Rose/pandas
    def _get_val_at(self, loc):
        n = len(self)
        if loc < 0:
            loc += n

        if loc >= n or loc < 0:
            raise IndexError('Out of bounds access')

        sp_loc = self.sp_index.lookup(loc)
        if sp_loc == -1:
            return self.fill_value
        else:
            # libindex.get_value_at will end up calling __getitem__,
            # so to avoid recursing we need to unwrap `self` so the
            # ndarray.__getitem__ implementation is called.
            return libindex.get_value_at(np.asarray(self), sp_loc)