From 9cc76783e6afab1acd165f8e9a24259487fe9077 Mon Sep 17 00:00:00 2001 From: ageay Date: Thu, 18 Jul 2013 13:13:51 +0000 Subject: [PATCH] On MD10 32 bits OS the size of objects is smaller than in 64 bits --- src/MEDCoupling_Swig/MEDCouplingMemArray.i | 4 ++-- src/MEDCoupling_Swig/MEDCouplingTypemaps.i | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MEDCoupling_Swig/MEDCouplingMemArray.i b/src/MEDCoupling_Swig/MEDCouplingMemArray.i index 620c02a0f..7e73d97ce 100644 --- a/src/MEDCoupling_Swig/MEDCouplingMemArray.i +++ b/src/MEDCoupling_Swig/MEDCouplingMemArray.i @@ -2498,7 +2498,7 @@ namespace ParaMEDMEM #ifdef WITH_NUMPY else if(PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL) {//DataArrayInt.New(numpyArray) - return BuildNewInstance(elt0,NPY_INT,&PyCallBackDataArrayInt_RefType,"INT32"); + return BuildNewInstance(elt0,NPY_INT32,&PyCallBackDataArrayInt_RefType,"INT32"); } #endif else @@ -2622,7 +2622,7 @@ namespace ParaMEDMEM #ifdef WITH_NUMPY PyObject *toNumPyArray() throw(INTERP_KERNEL::Exception) // not const. It is not a bug ! { - return ToNumPyArray(self,NPY_INT,"DataArrayInt"); + return ToNumPyArray(self,NPY_INT32,"DataArrayInt"); } #endif diff --git a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i index b0d4e26cc..af711aadd 100644 --- a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i +++ b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i @@ -212,13 +212,13 @@ MCData *BuildNewInstance(PyObject *elt0, int npyObjectType, PyTypeObject *pytype throw INTERP_KERNEL::Exception("Input numpy array should have dimension equal to 1 or 2 !"); if(PyArray_ObjectType(elt0,0)!=npyObjectType) { - std::ostringstream oss; oss << "Input numpy array has not of type " << msg << " at component #0 !"; + std::ostringstream oss; oss << "Input numpy array has not the type " << msg << " at component #0 !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } if(ndim==2) if(PyArray_ObjectType(elt0,1)!=npyObjectType) { - std::ostringstream oss; oss << "Input numpy array has not of type " << msg << " at component #1 !"; + std::ostringstream oss; oss << "Input numpy array has not the type " << msg << " at component #1 !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } npy_intp sz0=PyArray_DIM(elt0,0); -- 2.39.2