Index: sansmodels/src/sans/models/c_models/CBCCrystalModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CBCCrystalModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CBCCrystalModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -172,6 +172,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -213,5 +212,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CBarBellModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CBarBellModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CBarBellModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -174,6 +174,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -215,5 +214,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -164,6 +164,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -205,5 +204,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CCSParallelepipedModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCSParallelepipedModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CCSParallelepipedModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -184,6 +184,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -225,5 +224,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CCappedCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCappedCylinderModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CCappedCylinderModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -174,6 +174,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -215,5 +214,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CCoreFourShellModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreFourShellModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CCoreFourShellModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -178,6 +178,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -219,5 +218,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -175,6 +175,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -216,5 +215,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -179,6 +179,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -220,5 +219,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CCoreShellModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CCoreShellModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -163,6 +163,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -204,5 +203,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCylinderModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CCylinderModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -170,6 +170,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -211,5 +210,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -158,6 +158,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -199,5 +198,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -158,6 +158,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -199,5 +198,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -170,6 +170,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -211,5 +210,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -178,6 +178,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -219,5 +218,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CFCCrystalModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CFCCrystalModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CFCCrystalModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -172,6 +172,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -213,5 +212,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CFlexCylEllipXModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CFlexCylEllipXModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CFlexCylEllipXModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -170,6 +170,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -211,5 +210,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -166,6 +166,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -207,5 +206,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CFractalModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CFractalModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CFractalModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -160,6 +160,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -201,5 +200,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CFuzzySphereModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CFuzzySphereModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CFuzzySphereModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -162,6 +162,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -203,5 +202,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CGaussian.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CGaussian.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CGaussian.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -153,6 +153,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -194,5 +193,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -155,6 +155,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -196,5 +195,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -159,6 +159,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -200,5 +199,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -174,6 +174,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -215,5 +214,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -163,6 +163,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -204,5 +203,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CLamellarModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CLamellarModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -158,6 +158,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -199,5 +198,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CLamellarPCrystalModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarPCrystalModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CLamellarPCrystalModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -161,6 +161,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -202,5 +201,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -169,6 +169,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -210,5 +209,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -164,6 +164,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -205,5 +204,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CLogNormal.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLogNormal.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CLogNormal.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -153,6 +153,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -194,5 +193,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CLorentzian.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLorentzian.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CLorentzian.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -153,6 +153,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -194,5 +193,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CMultiShellModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CMultiShellModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CMultiShellModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -167,6 +167,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -208,5 +207,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/COnionModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/COnionModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/COnionModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -239,6 +239,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -280,5 +279,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -178,6 +178,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -219,5 +218,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CPearlNecklaceModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CPearlNecklaceModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CPearlNecklaceModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -165,6 +165,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -206,5 +205,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CPoly_GaussCoil.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CPoly_GaussCoil.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CPoly_GaussCoil.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -157,6 +157,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -198,5 +197,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CRPAModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CRPAModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CRPAModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -182,6 +182,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -223,5 +222,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CReflAdvModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CReflAdvModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CReflAdvModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -224,6 +224,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -265,5 +264,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CReflModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CReflModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CReflModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -200,6 +200,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -241,5 +240,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CSCCrystalModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSCCrystalModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CSCCrystalModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -172,6 +172,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -213,5 +212,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CSLDCalFunc.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSLDCalFunc.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CSLDCalFunc.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -159,6 +159,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -200,5 +199,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CSchulz.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSchulz.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CSchulz.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -153,6 +153,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -194,5 +193,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CSphereModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSphereModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CSphereModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -158,6 +158,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -199,5 +198,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CSphereSLDModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSphereSLDModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CSphereSLDModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -216,6 +216,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -257,5 +256,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -157,6 +157,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -198,5 +197,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -177,6 +177,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -218,5 +217,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -157,6 +157,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -198,5 +197,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -178,6 +178,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -219,5 +218,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/CVesicleModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CVesicleModel.cpp	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/CVesicleModel.cpp	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -162,6 +162,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -203,5 +202,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
Index: sansmodels/src/sans/models/c_models/classTemplate.txt
===================================================================
--- sansmodels/src/sans/models/c_models/classTemplate.txt	(revision 0b082f3de70162b384089745e139588fda206422)
+++ sansmodels/src/sans/models/c_models/classTemplate.txt	(revision ab87b6104e5d54c38161feba5cda59ca90cbde10)
@@ -143,6 +143,5 @@
         return NULL;
     }
-    result = (PyArrayObject *)PyArray_FromDims(q->nd, (int *)(q->dimensions), 
-										  PyArray_DOUBLE);
+	result = (PyArrayObject *)PyArray_SimpleNew(q->nd, (npy_intp *)(q->dimensions), PyArray_DOUBLE);										  
 	if (result == NULL) {
         const char * message= "Could not create result ";
@@ -184,5 +183,5 @@
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_SimpleNew(1,(npy_intp *)dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
