(self, index)
| 777 | ) |
| 778 | |
| 779 | def _partitions(self, index): |
| 780 | # Used by `partitions` for partition-wise slicing |
| 781 | |
| 782 | # Convert index to list |
| 783 | if isinstance(index, int): |
| 784 | index = [index] |
| 785 | index = np.arange(self.npartitions, dtype=object)[index].tolist() |
| 786 | |
| 787 | # Check that selection makes sense |
| 788 | assert set(index).issubset(range(self.npartitions)) |
| 789 | |
| 790 | # Return selected partitions |
| 791 | return new_collection(expr.Partitions(self, index)) |
| 792 | |
| 793 | @property |
| 794 | def partitions(self): |
nothing calls this directly
no test coverage detected