slice_aggregator/by_ixs.py
def inc(self, start: typing.Optional[int], stop: typing.Optional[int], value: V) -> None:
        """ Increment the value assigned to a slice """
        if start is None:
            if stop is None:
                self.value_offset += value
            else:
                self.dual[stop - 1] += value
        elif stop is None:
            self.dual[start - 1] -= value
            self.value_offset += value
        elif start < stop:
            self.dual[start - 1] -= value
            self.dual[stop - 1] += value
        elif start > stop:
            raise ValueError("start > stop")
 Increment the value assigned to a slice 
Increment the value assigned to a slice
Increment the value assigned to a slice
def inc(self, start: typing.Optional[int], stop: typing.Optional[int], value: V) -> None:
        if start is None:
            if stop is None:
                self.value_offset += value
            else:
                self.dual[stop - 1] += value
        elif stop is None:
            self.dual[start - 1] -= value
            self.value_offset += value
        elif start < stop:
            self.dual[start - 1] -= value
            self.dual[stop - 1] += value
        elif start > stop:
            raise ValueError("start > stop")
def inc ( self , start : typing . Optional [ int ] , stop : typing . Optional [ int ] , value : V ) -> None : if start is None : if stop is None : self . value_offset += value else : self . dual [ stop - 1 ] += value elif stop is None : self . dual [ start - 1 ] -= value self . value_offset += value elif start < stop : self . dual [ start - 1 ] -= value self . dual [ stop - 1 ] += value elif start > stop : raise ValueError ( "start > stop" )
Increment the value assigned to a slice
Increment the value assigned to a slice
""" Increment the value assigned to a slice """
self
start
typing.Optional[int]
stop
typing.Optional[int]
value
V