| 181 | return self.keys() # FIXME! this implementation materializes the graph |
| 182 | |
| 183 | def _dask_keys(self): |
| 184 | if self._cached_keys is not None: |
| 185 | return self._cached_keys |
| 186 | |
| 187 | name, chunks, numblocks = self.name, self.chunks, self.numblocks |
| 188 | |
| 189 | def keys(*args): |
| 190 | if not chunks: |
| 191 | return [(name,)] |
| 192 | ind = len(args) |
| 193 | if ind + 1 == len(numblocks): |
| 194 | result = [(name,) + args + (i,) for i in range(numblocks[ind])] |
| 195 | else: |
| 196 | result = [keys(*(args + (i,))) for i in range(numblocks[ind])] |
| 197 | return result |
| 198 | |
| 199 | self._cached_keys = result = keys() |
| 200 | return result |
| 201 | |
| 202 | def _construct_graph(self, deserializing=False): |
| 203 | """Construct graph for a simple overlap operation.""" |