3D array using data from existing lists
问题 I am new to python and am having trouble with multi-dimensional arrays. I have a list(s) of points in 3-dimensions(x,y,z) that I am trying to use in marching_cubes_lewiner(). The co-ordinate values are in 3 lists: x,y and z such that any point will be given by (x[i],y[i],z[i]). Now, marching_cubes_lewiner() accepts volume as a 3D numpy array. What would be the best way to convert the 3 lists into a 3D numpy array? I have tried: s=len(x) points = np.ndarray((s,s,s),buffer=np.array([x,y,z]),