From 0091dd4ad339df94590747571e0d20fa6aa6fb14 Mon Sep 17 00:00:00 2001 From: ageay Date: Wed, 10 Apr 2013 11:08:58 +0000 Subject: [PATCH] MEDCouplingFieldDouble.__getitem__ on components --- src/MEDCoupling_Swig/MEDCouplingCommon.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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