Vectorizing the creation of 3D coordinates
How can I generate an array of all integer (x, y, z) points in the specified ranges of each axis without doing a triple loop? Something better than this ... (I looked at the meshgrid functions, but don't understand how to apply them here).
points = []
for i in range(-x,x):
for j in range(-y,y):
for k in range(-z,z):
points.append((i,j,k))
+3
chris
source
to share
No one has answered this question yet
See similar questions:
112
12
0
or similar:
1509
994
677
555
471
460
432
161
126
115