In python, a 0 filled 2D array can be achieved using:
[[0 for x in range(w)] for y in range(h)]
//where w is the width and h is the height
I was wondering, how could this be done so you could create a function which could return a N dimensional array filled with 0s, where the x,y,z,w etc were specified in an array as a parameter.
Example:
makeNArray(3, [4, 5, 6])
//would make a 3D array which was 4x5x6
arr = numpy.zeros((4, 5, 6)).