From c44f12cae57c7ef53ffbeb03b167ecab3b0cb2ad Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 15 Nov 2018 13:42:19 +0100 Subject: [PATCH] map needs to be explicitly casted to list --- lib/damask/test/test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/damask/test/test.py b/lib/damask/test/test.py index 0e1a0284c..e2ef89330 100644 --- a/lib/damask/test/test.py +++ b/lib/damask/test/test.py @@ -384,10 +384,10 @@ class Test(): while table0.data_read(): # read next data line of ASCII table if line0 not in skipLines: for i in range(dataLength): - myData = np.array(map(float,table0.data[column[0][i]:\ - column[0][i]+length[i]]),'d') - normData = np.array(map(float,table0.data[normColumn[i]:\ - normColumn[i]+normLength[i]]),'d') + myData = np.array(list(map(float,table0.data[column[0][i]:\ + column[0][i]+length[i]])),'d') + normData = np.array(list(map(float,table0.data[normColumn[i]:\ + normColumn[i]+normLength[i]])),'d') data[i] = np.append(data[i],np.reshape(myData,shape[i])) if normType == 'pInf': norm[i] = np.append(norm[i],np.max(np.abs(normData))) @@ -410,8 +410,8 @@ class Test(): while table1.data_read(): # read next data line of ASCII table if line1 not in skipLines: for i in range(dataLength): - myData = np.array(map(float,table1.data[column[1][i]:\ - column[1][i]+length[i]]),'d') + myData = np.array(list(map(float,table1.data[column[1][i]:\ + column[1][i]+length[i]])),'d') maxError[i] = max(maxError[i],np.linalg.norm(np.reshape(myData-data[i][line1-len(skipLines),:],shape[i]))/ norm[i][line1-len(skipLines)]) line1 +=1