initjdsym(void) { PyObject *m; m = Py_InitModule3("jdsym", jdsym_methods, module_doc); /* initialize Numeric array module */ import_array(); /* initialize spmatrix module */ import_spmatrix(); /* No need to check the error here, the caller will do that */ }
DL_EXPORT( void ) init_pyma57( void ) { PyObject *m, *d; if( PyType_Ready( &Pyma57Type ) < 0 ) return; m = Py_InitModule3( "_pyma57", Pyma57Methods, "Python interface to MA57" ); d = PyModule_GetDict(m); PyDict_SetItemString(d, "Pyma57Type", (PyObject *)&Pyma57Type); import_array( ); /* Initialize the NumPy module. */ import_spmatrix( ); /* Initialize the PySparse module. */ /* Check for errors */ if (PyErr_Occurred()) Py_FatalError("Unable to initialize module pyma57"); return; }