(self, bounds=None)
Update the bound size, and update the slice information
        accordingly.
Update the bound size, and update the slice information
        accordingly.
Update the bound size and update the slice information accordingly .
def set_bounds(self, bounds=None):
        """Update the bound size, and update the slice information
        accordingly."""
        if bounds is None:
            bounds = np.array([0, self.size], dtype=np.int32)
        self.bounds = bounds
        
        # is regular?
        d = np.diff(bounds)
        r = False
        if len(d) > 0:
            dm, dM = d.min(), d.max()
            if dm == dM:
                r = dm
                # log_info("Regular bounds")
        
        self.subdata_bounds = [self._slice_bounds(self.bounds, pos, size, r) \
            for pos, size in self.slices]
def set_bounds ( self , bounds = None ) : if bounds is None : bounds = np . array ( [ 0 , self . size ] , dtype = np . int32 ) self . bounds = bounds # is regular? d = np . diff ( bounds ) r = False if len ( d ) > 0 : dm , dM = d . min ( ) , d . max ( ) if dm == dM : r = dm # log_info("Regular bounds") self . subdata_bounds = [ self . _slice_bounds ( self . bounds , pos , size , r ) for pos , size in self . slices ]