avoid int16

for any reasoable input, int32 should be sufficient, no need to worry
about int64.
This commit is contained in:
Martin Diehl 2021-09-12 21:54:04 +02:00
parent c93c4e462d
commit f9c7781a35
1 changed files with 2 additions and 1 deletions

View File

@ -270,7 +270,8 @@ class Grid:
cells = np.array(v.vtk_data.GetDimensions())-1
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'))