From 55c759f395becab91c8e74888e498ad18ecb94cf Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 4 Jun 2013 12:39:07 +0000 Subject: [PATCH] Last bug, when reading a node field --- src/MEDLoader/Swig/CaseReader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MEDLoader/Swig/CaseReader.py b/src/MEDLoader/Swig/CaseReader.py index 2a67d420e..87d2fbcce 100644 --- a/src/MEDLoader/Swig/CaseReader.py +++ b/src/MEDLoader/Swig/CaseReader.py @@ -195,7 +195,11 @@ class CaseReader(CaseIO): st=fd.read(80).strip() ; pos=fd.tell() offset=0 while pos!=end and st!="part": - nbOfValsOfTyp=mcmeshes[meshId].getNumberOfCellsWithType(self.dictMCTyp2[st]) + if st!="coordinates": + nbOfValsOfTyp=mcmeshes[meshId].getNumberOfCellsWithType(self.dictMCTyp2[st]) + else: + nbOfValsOfTyp=nbOfValues + pass vals=np.memmap(fd,dtype='float32',mode='r',offset=int(pos),shape=(nbOfValsOfTyp,nbCompo))#np.memmap(fd,dtype='int32',mode='r',offset=159,shape=(1)) vals2[offset:offset+nbOfValsOfTyp]=DataArrayDouble(np.array(vals,dtype='float64')).fromNoInterlace() pos+=nbOfValsOfTyp*nbCompo*4 ; fd.seek(pos) -- 2.39.2