force type cast index to int for numpy array
Force type casting indices into int array to avoid warning: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future For more info, see http://stackoverflow.com/questions/20084218/deprecation-warning-in-scikit-learn-svmlight-format-loader
This commit is contained in:
parent
4cb27b76df
commit
804931db9e
|
@ -126,9 +126,9 @@ for name in filenames:
|
||||||
primPos = invRotation*gridpos # rotate back to primitive coordinate system
|
primPos = invRotation*gridpos # rotate back to primitive coordinate system
|
||||||
if np.dot(mask*primPos/dim,mask*primPos/dim) <= 0.25 and \
|
if np.dot(mask*primPos/dim,mask*primPos/dim) <= 0.25 and \
|
||||||
np.all(abs((1.-mask)*primPos/dim) <= 0.5): # inside ellipsoid and inside box
|
np.all(abs((1.-mask)*primPos/dim) <= 0.5): # inside ellipsoid and inside box
|
||||||
microstructure[(gridpos[0]+options.center[0])%info['grid'][0],
|
microstructure[int((gridpos[0]+options.center[0])%info['grid'][0]),
|
||||||
(gridpos[1]+options.center[1])%info['grid'][1],
|
int((gridpos[1]+options.center[1])%info['grid'][1]),
|
||||||
(gridpos[2]+options.center[2])%info['grid'][2]] = options.fill # assign microstructure index
|
int((gridpos[2]+options.center[2])%info['grid'][2])] = options.fill # assign microstructure index
|
||||||
|
|
||||||
newInfo['microstructures'] = microstructure.max()
|
newInfo['microstructures'] = microstructure.max()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue