A simple subs function that works both on tuples and strings
(ind, substitution)
| 210 | |
| 211 | |
| 212 | def index_subs(ind, substitution): |
| 213 | """A simple subs function that works both on tuples and strings""" |
| 214 | if ind is None: |
| 215 | return ind |
| 216 | else: |
| 217 | return tuple(substitution.get(c, c) for c in ind) |
| 218 | |
| 219 | |
| 220 | _BLOCKWISE_DEFAULT_PREFIX = "__dask_blockwise__" |
searching dependent graphs…