}
// serialization
+
+ static PyObject *__new__(PyObject *args) throw(INTERP_KERNEL::Exception)
+ {
+ static const char MSG[]="DataArrayDouble.__new__ : the args in input is expected to be a tuple of size 2 !";
+ if(!PyTuple_Check(args))
+ throw INTERP_KERNEL::Exception(MSG);
+ PyObject *globals(PyEval_GetGlobals());//borrowed
+ PyObject *builtins(PyDict_GetItemString(globals,"__builtins__"));//borrowed
+ PyObject *obj(PyObject_GetAttrString(builtins,"object"));
+ PyObject *selfMeth(PyObject_GetAttrString(obj,"__new__"));
+ Py_DECREF(obj);
+ PyObject *instance(PyObject_CallObject(selfMeth,PyTuple_GetItem(args,0)));
+ Py_DECREF(selfMeth);
+ PyObject *initMeth(PyObject_GetAttrString(instance,"__init__"));
+ if(PyTuple_Size(args)==2 && PyDict_Check(PyTuple_GetItem(args,1)))
+ { //unserialization requested
+ PyObject *tmp1(PyInt_FromLong(0));
+ PyObject *zeNumpyRepr(PyDict_GetItem(PyTuple_GetItem(args,1),tmp1));//borrowed
+ Py_DECREF(tmp1);
+ PyObject *tmp3(PyTuple_New(1));
+ PyTuple_SetItem(tmp3,0,zeNumpyRepr); Py_XINCREF(zeNumpyRepr);
+ PyObject *tmp2(PyObject_CallObject(initMeth,tmp3));
+ Py_DECREF(tmp2);
+ Py_DECREF(tmp3);
+ }
+ else
+ {
+ int sz(PyTuple_Size(args));
+ PyObject *tmp3(PyTuple_New(sz-1));
+ for(int i=0;i<sz-1;i++)
+ {
+ PyObject *tmp0(PyTuple_GetItem(args,i+1)); Py_XINCREF(tmp0);
+ PyTuple_SetItem(tmp3,i,tmp0);
+ }
+ PyObject *tmp2(PyObject_CallObject(initMeth,tmp3));
+ Py_DECREF(tmp2);
+ Py_DECREF(tmp3);
+ }
+ Py_DECREF(initMeth);
+ return instance;
+ }
PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
{