Define a range for user-provided output object. The output object will only be modified in the range specified by the start, stop and step parameters in the main dimension of output (or the leading one, if the object does not have the concept of main dimension, like
(
self,
start: int | None = None,
stop: int | None = None,
step: int | None = None,
)
| 386 | self.append_mode = append_mode |
| 387 | |
| 388 | def set_output_range( |
| 389 | self, |
| 390 | start: int | None = None, |
| 391 | stop: int | None = None, |
| 392 | step: int | None = None, |
| 393 | ) -> None: |
| 394 | """Define a range for user-provided output object. |
| 395 | |
| 396 | The output object will only be modified in the range specified by the |
| 397 | start, stop and step parameters in the main dimension of output (or the |
| 398 | leading one, if the object does not have the concept of main dimension, |
| 399 | like a NumPy container). |
| 400 | |
| 401 | """ |
| 402 | if self.out is None: |
| 403 | raise IndexError( |
| 404 | "You need to pass an output object to `setOut()` first" |
| 405 | ) |
| 406 | self.o_start = start |
| 407 | self.o_stop = stop |
| 408 | self.o_step = step |
| 409 | |
| 410 | # Although the next code is similar to the method in `Leaf`, it |
| 411 | # allows the use of pure NumPy objects. |
no outgoing calls