From: ageay Date: Wed, 10 Apr 2013 11:08:58 +0000 (+0000) Subject: MEDCouplingFieldDouble.__getitem__ on components X-Git-Tag: V6_main_FINAL~166 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0091dd4ad339df94590747571e0d20fa6aa6fb14;p=tools%2Fmedcoupling.git MEDCouplingFieldDouble.__getitem__ on components --- diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index a8c98fc41..2cf90fc05 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -3327,7 +3327,7 @@ namespace ParaMEDMEM } case 3: { - int nbOfComp=(slic.second.first-1-slic.first)/slic.second.second+1; + int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(slic.first,slic.second.first,slic.second.second,"MEDCouplingFieldDouble::__getitem__ : invalid range in 2nd parameter (components) !"); std::vector v2(nbOfComp); for(int i=0;i