Make a joblib-friendly index subset updater. Parameters ---------- idx : ndarray List of indices for this subset. Returns ------- updater : instance of PBSubsetUpdater Class with a ``.update(ii)`` method.
(self, idx)
| 143 | yield from self._tqdm |
| 144 | |
| 145 | def subset(self, idx): |
| 146 | """Make a joblib-friendly index subset updater. |
| 147 | |
| 148 | Parameters |
| 149 | ---------- |
| 150 | idx : ndarray |
| 151 | List of indices for this subset. |
| 152 | |
| 153 | Returns |
| 154 | ------- |
| 155 | updater : instance of PBSubsetUpdater |
| 156 | Class with a ``.update(ii)`` method. |
| 157 | """ |
| 158 | return _PBSubsetUpdater(self, idx) |
| 159 | |
| 160 | def __enter__(self): # noqa: D105 |
| 161 | # This should only be used with pb.subset and parallelization |