Index: sansmodels/src/sans/models/BaseComponent.py
===================================================================
--- sansmodels/src/sans/models/BaseComponent.py	(revision f9bf66165686c721c2f0b3a197f7dda1822721ad)
+++ sansmodels/src/sans/models/BaseComponent.py	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -68,23 +68,10 @@
             
             
-            * For 2D, a list of numpy arrays are expected: [qx_prime,qy_prime].
-            
-            For the following matrix of q_values [qx,qy], we will have:
-                      +--------+--------+--------+
-            qy[2]     |        |        |        | 
-                      +--------+--------+--------+
-            qy[1]     |        |        |        |
-                      +--------+--------+--------+            
-            qy[0]     |        |        |        | 
-                      +--------+--------+--------+
-                        qx[0]    qx[1]    qx[2]
-
-
-            The q-values must be stored in numpy arrays.
-            The qxprime and qyprime are 2D arrays. From the two lists of q-values 
-            above, numpy arrays must be created the following way:
-
-            qx_prime = numpy.reshape(qx, [1,3])
-            qy_prime = numpy.reshape(qy, [3,1])
+            * For 2D, a list of numpy arrays are expected: [qx_prime,qy_prime],
+            where 1D arrays,
+            
+            qx_prime = [ qx[0], qx[1], qx[2], ....]
+            and
+            qy_prime = [ qy[0], qy[1], qy[2], ....] 
             
             The method is then called the following way:
@@ -92,5 +79,5 @@
             evalDistribution([qx_prime, qy_prime])
             
-            @param qdist: ndarray of scalar q-values or list [qx,qy] where qx,qy are 2D ndarrays 
+            @param qdist: ndarray of scalar q-values or list [qx,qy] where qx,qy are 1D ndarrays 
         """
         if qdist.__class__.__name__ == 'list':
@@ -106,9 +93,8 @@
             
             # Create output array
-            iq_array = numpy.zeros([qx.shape[1], qy.shape[0]])
-             
-            for j in range(qy.shape[0]):
-                for i in range(qx.shape[1]):
-                    iq_array[j][i] = self.runXY([qx[0][i],qy[j][0]])
+            iq_array = numpy.zeros((len(qx)))
+            
+            for i in range(len(qx)):
+                    iq_array[i] = self.runXY([qx[i],qy[i]])
             return iq_array
                 
Index: sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp	(revision 4cbaf3560d19e19647ad025a9ea3239a0d1934a7)
+++ sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -184,9 +184,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -196,9 +196,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -208,13 +208,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CBinaryHSPSF11Model.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CBinaryHSPSF11Model.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CBinaryHSPSF11Model.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -184,9 +184,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -196,9 +196,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -208,13 +208,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -195,9 +195,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -207,9 +207,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -219,13 +219,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -198,9 +198,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -210,9 +210,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -222,13 +222,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CCoreShellModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCoreShellModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CCoreShellModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -183,9 +183,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -195,9 +195,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -207,13 +207,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CCylinderModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -189,9 +189,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -201,9 +201,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -213,13 +213,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -178,9 +178,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -190,9 +190,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -202,13 +202,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -178,9 +178,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -190,9 +190,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -202,13 +202,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -189,9 +189,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -201,9 +201,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -213,13 +213,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -197,9 +197,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -209,9 +209,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -221,13 +221,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -185,9 +185,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -197,9 +197,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -209,13 +209,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CGaussian.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CGaussian.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CGaussian.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -173,9 +173,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -185,9 +185,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -197,13 +197,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -175,9 +175,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -187,9 +187,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -199,13 +199,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -179,9 +179,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -191,9 +191,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -203,13 +203,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -193,9 +193,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -205,9 +205,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -217,13 +217,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -183,9 +183,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -195,9 +195,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -207,13 +207,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CLamellarModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CLamellarModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -178,9 +178,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -190,9 +190,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -202,13 +202,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -189,9 +189,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -201,9 +201,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -213,13 +213,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -183,9 +183,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -195,9 +195,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -207,13 +207,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CLogNormal.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLogNormal.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CLogNormal.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -173,9 +173,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -185,9 +185,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -197,13 +197,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CLorentzian.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CLorentzian.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CLorentzian.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -173,9 +173,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -185,9 +185,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -197,13 +197,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CMultiShellModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CMultiShellModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CMultiShellModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -187,9 +187,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -199,9 +199,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -211,13 +211,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/COblateModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/COblateModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/COblateModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -192,9 +192,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -204,9 +204,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -216,13 +216,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -197,9 +197,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -209,9 +209,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -221,13 +221,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CProlateModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CProlateModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CProlateModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -190,9 +190,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -202,9 +202,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -214,13 +214,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CSchulz.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSchulz.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CSchulz.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -173,9 +173,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -185,9 +185,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -197,13 +197,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CSphereModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSphereModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CSphereModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -177,9 +177,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -189,9 +189,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -201,13 +201,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -177,9 +177,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -189,9 +189,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -201,13 +201,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -197,9 +197,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -209,9 +209,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -221,13 +221,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -177,9 +177,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -189,9 +189,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -201,13 +201,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -188,9 +188,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -200,9 +200,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -212,13 +212,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/CVesicleModel.cpp
===================================================================
--- sansmodels/src/sans/models/c_models/CVesicleModel.cpp	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/CVesicleModel.cpp	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -182,9 +182,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -194,9 +194,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -206,13 +206,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
Index: sansmodels/src/sans/models/c_models/classTemplate.txt
===================================================================
--- sansmodels/src/sans/models/c_models/classTemplate.txt	(revision 71e2de7847488b42c4cf0dc9dec0f020e2d9b586)
+++ sansmodels/src/sans/models/c_models/classTemplate.txt	(revision 308052778784baf067479c9e63914a0293dc7ebd)
@@ -163,9 +163,9 @@
  {
     PyArrayObject *result;
-    int i,j, x_len, y_len, dims[2];
+    int i,j, x_len, y_len, dims[1];
     //check validity of input vectors
-    if (x->nd != 2 || x->descr->type_num != PyArray_DOUBLE
-        || y->nd != 2 || y->descr->type_num != PyArray_DOUBLE
-        || y->dimensions[1] != x->dimensions[0]){
+    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE
+        || y->nd != 1 || y->descr->type_num != PyArray_DOUBLE
+        || y->dimensions[0] != x->dimensions[0]){
         const char * message= "evaluateTwoDimXY  expect 2 numpy arrays";
         PyErr_SetString(PyExc_ValueError , message); 
@@ -175,9 +175,9 @@
 	if (PyArray_Check(x) && PyArray_Check(y)) {
 		
-	    x_len = dims[1]= x->dimensions[1];
+	    x_len = dims[0]= x->dimensions[0];
         y_len = dims[0]= y->dimensions[0];
 	    
 	    // Make a new double matrix of same dims
-        result=(PyArrayObject *) PyArray_FromDims(2,dims,NPY_DOUBLE);
+        result=(PyArrayObject *) PyArray_FromDims(1,dims,NPY_DOUBLE);
         if (result == NULL){
 	    const char * message= "Could not create result ";
@@ -187,13 +187,11 @@
        
         /* Do the calculation. */
-        for ( j=0; j< y_len; j++) {
-            for ( i=0; i< x_len; i++) {
-                double x_value = *(double *)(x->data + i*x->strides[1]);
-      		    double y_value = *(double *)(y->data + j*y->strides[0]);
-      			double *result_value = (double *)(result->data +
-      			      j*result->strides[0] + i*result->strides[1]);
-      			*result_value = (*model)(x_value, y_value);
-            }           
-        }
+        for ( i=0; i< x_len; i++) {
+            double x_value = *(double *)(x->data + i*x->strides[0]);
+  		    double y_value = *(double *)(y->data + i*y->strides[0]);
+  			double *result_value = (double *)(result->data +
+  			      i*result->strides[0]);
+  			*result_value = (*model)(x_value, y_value);
+        }           
         return PyArray_Return(result); 
         
