How do you use numpy.mgrid with a variable number of indices? I can't find any examples on github of anyone using this with anything but hardcoded values.
import numpy as np
np.mgrid[1:10, 1:10] # this works fine
x = (1, 10)
np.mgrid[x[0]:x[1], x[0]:x[1]] # hardcoded
xs = [(1,10)] * 10
np.mgrid[*xs????] # I can't get anything to work here