Adjust all `slice_from_time()` calls to not expect mask
							parent
							
								
									7e7748ce6b
								
							
						
					
					
						commit
						0dc73ee186
					
				| 
						 | 
				
			
			@ -182,7 +182,11 @@ class IncrementalFormatter(msgspec.Struct):
 | 
			
		|||
            nd_stop = self.xy_nd_stop = src_stop
 | 
			
		||||
 | 
			
		||||
            align_index = array[self.index_field]
 | 
			
		||||
            self._index_step_size = align_index[-1] - align_index[-2]
 | 
			
		||||
            self._index_step_size = (
 | 
			
		||||
                align_index[-1]
 | 
			
		||||
                -
 | 
			
		||||
                align_index[-2]
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        # compute the length diffs between the first/last index entry in
 | 
			
		||||
        # the input data and the last indexes we have on record from the
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -126,7 +126,7 @@ def path_arrays_from_ohlc(
 | 
			
		|||
        high = q['high']
 | 
			
		||||
        low = q['low']
 | 
			
		||||
        close = q['close']
 | 
			
		||||
        index = float64(q['time'])
 | 
			
		||||
        index = float64(q['index'])
 | 
			
		||||
 | 
			
		||||
        # XXX: ``numba`` issue: https://github.com/numba/numba/issues/8622
 | 
			
		||||
        # index = float64(q[index_field])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1036,17 +1036,12 @@ class ChartPlotWidget(pg.PlotWidget):
 | 
			
		|||
            (
 | 
			
		||||
                abs_slc,
 | 
			
		||||
                read_slc,
 | 
			
		||||
                mask,
 | 
			
		||||
 | 
			
		||||
            ) = slice_from_time(
 | 
			
		||||
                array,
 | 
			
		||||
                start_t=vtl,
 | 
			
		||||
                stop_t=vtr,
 | 
			
		||||
            )
 | 
			
		||||
            iv_arr = array
 | 
			
		||||
            if mask is not None:
 | 
			
		||||
                iv_arr = array[mask]
 | 
			
		||||
 | 
			
		||||
            iv_arr = array[read_slc]
 | 
			
		||||
            index = iv_arr['time']
 | 
			
		||||
 | 
			
		||||
        else:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -291,13 +291,12 @@ class Viz(msgspec.Struct):  # , frozen=True):
 | 
			
		|||
            (
 | 
			
		||||
                abs_slc,
 | 
			
		||||
                read_slc,
 | 
			
		||||
                mask,
 | 
			
		||||
            ) = slice_from_time(
 | 
			
		||||
                arr,
 | 
			
		||||
                start_t=lbar,
 | 
			
		||||
                stop_t=rbar,
 | 
			
		||||
            )
 | 
			
		||||
            slice_view = arr[mask]
 | 
			
		||||
            slice_view = arr[read_slc]
 | 
			
		||||
 | 
			
		||||
        else:
 | 
			
		||||
            ifirst = arr[0]['index']
 | 
			
		||||
| 
						 | 
				
			
			@ -444,7 +443,6 @@ class Viz(msgspec.Struct):  # , frozen=True):
 | 
			
		|||
            (
 | 
			
		||||
                abs_slc,
 | 
			
		||||
                read_slc,
 | 
			
		||||
                mask,
 | 
			
		||||
            ) = slice_from_time(
 | 
			
		||||
                array,
 | 
			
		||||
                start_t=lbar,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue