From f9c7781a35698e8f9ffad038c292db4edcbae778 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Sep 2021 21:54:04 +0200 Subject: [PATCH] avoid int16 for any reasoable input, int32 should be sufficient, no need to worry about int64. --- python/damask/_grid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/damask/_grid.py b/python/damask/_grid.py index 1338ad1d5..978f5e5fb 100644 --- a/python/damask/_grid.py +++ b/python/damask/_grid.py @@ -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'))