Splits this Array into chunks of size n. If `drop_last` is True, drops the last subarray if the split results in an inequal division.
(self, n, drop_last=False)
| 620 | return Array(self[n[i] : n[i + 1]] for i in range(n.size - 1)) |
| 621 | |
| 622 | def chunks(self, n, drop_last=False): |
| 623 | """ |
| 624 | Splits this Array into chunks of size n. |
| 625 | If `drop_last` is True, drops the last subarray if the split |
| 626 | results in an inequal division. |
| 627 | """ |
| 628 | self.__validate_bool_arg(drop_last, "drop_last") |
| 629 | fun = int if drop_last else math.ceil |
| 630 | return Array(self[i * n : (i + 1) * n] for i in range(fun(self.size / n))) |
| 631 | |
| 632 | def windows(self, size, stride=1, drop_last=True): |
| 633 | """ |
nothing calls this directly
no test coverage detected