def indices(dimensions, dtype=int32): ind = _dsutils.indices(asIterable(dimensions)) dtype = _translatenativetype(dtype) if dtype != int32: ind = _dsutils.cast(ind, dtype.value) return ind
def cast(a, dtype): return _dsutils.cast(a, dtype.value)