duplicated comment line
This commit is contained in:
parent
7aa47d8f5a
commit
d636b53e2b
|
@ -152,9 +152,9 @@ for name in filenames:
|
||||||
n = np.maximum(np.ones(3),np.array(grid*fraction),dtype=int,casting='unsafe') # find max grid indices within fraction
|
n = np.maximum(np.ones(3),np.array(grid*fraction),dtype=int,casting='unsafe') # find max grid indices within fraction
|
||||||
meshgrid = np.meshgrid(*map(np.arange,n),indexing='ij') # create a meshgrid within fraction
|
meshgrid = np.meshgrid(*map(np.arange,n),indexing='ij') # create a meshgrid within fraction
|
||||||
coords = np.vstack((meshgrid[0],meshgrid[1],meshgrid[2])).reshape(n.prod(),3) # assemble list of 3D coordinates
|
coords = np.vstack((meshgrid[0],meshgrid[1],meshgrid[2])).reshape(n.prod(),3) # assemble list of 3D coordinates
|
||||||
seeds = (random.sample(coords.tolist(),options.N)+np.random.rand(options.N,3))/(n/fraction) # pick options.N of those, rattle position,
|
seeds = (random.sample(coords.tolist(),options.N)+np.random.rand(options.N,3))/(n/fraction) # ... pick N of those, rattle position,
|
||||||
# and rescale to fall within fraction
|
# ... and rescale to fall within fraction
|
||||||
else: # and rescale to fall within fraction
|
else:
|
||||||
seeds = np.empty((options.N,3)) # seed positions array
|
seeds = np.empty((options.N,3)) # seed positions array
|
||||||
seeds[0] = np.random.random(3)*grid/max(grid)
|
seeds[0] = np.random.random(3)*grid/max(grid)
|
||||||
i = 1 # start out with one given point
|
i = 1 # start out with one given point
|
||||||
|
|
Loading…
Reference in New Issue