avoid int16
for any reasoable input, int32 should be sufficient, no need to worry about int64.
This commit is contained in:
parent
c93c4e462d
commit
f9c7781a35
|
@ -270,7 +270,8 @@ class Grid:
|
||||||
cells = np.array(v.vtk_data.GetDimensions())-1
|
cells = np.array(v.vtk_data.GetDimensions())-1
|
||||||
bbox = np.array(v.vtk_data.GetBounds()).reshape(3,2).T
|
bbox = np.array(v.vtk_data.GetBounds()).reshape(3,2).T
|
||||||
|
|
||||||
return Grid(v.get('MaterialId').reshape(cells,order='F') - 1, bbox[1] - bbox[0], bbox[0],
|
return Grid(v.get('MaterialId').reshape(cells,order='F').astype('int32',casting='unsafe') - 1,
|
||||||
|
bbox[1] - bbox[0], bbox[0],
|
||||||
util.execution_stamp('Grid','load_Neper'))
|
util.execution_stamp('Grid','load_Neper'))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue