From: ageay Date: Tue, 4 Jun 2013 12:39:07 +0000 (+0000) Subject: Last bug, when reading a node field X-Git-Tag: V6_main_FINAL~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=55c759f395becab91c8e74888e498ad18ecb94cf;p=tools%2Fmedcoupling.git Last bug, when reading a node field --- 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)