From ce47e18e5c2c55c2af459a78223f62742ad148e0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 15 Jan 2020 13:45:05 +0100 Subject: [PATCH] not needed for integer arrays --- python/damask/table.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/damask/table.py b/python/damask/table.py index b3dfc2433..c732456b6 100644 --- a/python/damask/table.py +++ b/python/damask/table.py @@ -48,7 +48,7 @@ class Table(): def __add_comment(self,label,shape,info): if info is not None: self.comments.append('{}{}: {}'.format(label, - ' '+str(shape) if np.prod(shape,dtype=int) > 1 else '', + ' '+str(shape) if np.prod(shape) > 1 else '', info)) @@ -208,7 +208,7 @@ class Table(): self.__add_comment(label,data.shape[1:],info) self.shapes[label] = data.shape[1:] if len(data.shape) > 1 else (1,) - size = np.prod(data.shape[1:],dtype=int) + size = np.prod(data.shape[1:]) new = pd.DataFrame(data=data.reshape(-1,size), columns=[label]*size, ) @@ -329,7 +329,7 @@ class Table(): for i in range(self.shapes[l][0])] else: labels += ['{}:{}_{}'.format('x'.join([str(d) for d in self.shapes[l]]),i+1,l) \ - for i in range(np.prod(self.shapes[l],dtype=int))] + for i in range(np.prod(self.shapes[l]))] header = ['{} header'.format(len(self.comments)+1)] \ + self.comments \