Index: /branches/numpy/anuga/mesh_engine/mesh_engine_c_layer.c
===================================================================
--- /branches/numpy/anuga/mesh_engine/mesh_engine_c_layer.c	(revision 6737)
+++ /branches/numpy/anuga/mesh_engine/mesh_engine_c_layer.c	(revision 6738)
@@ -269,6 +269,6 @@
   dimensions[0] = out.numberoftriangles;
   dimensions[1] = 3;   
-  gentrianglelist = (PyArrayObject *) PyArray_FromDimsAndData(2,
-					    dimensions,
+  gentrianglelist = (PyArrayObject *) PyArray_SimpleNewFromData(2,
+					    (npy_intp*) dimensions,
 					    PyArray_INT, 
   					    (char*) out.trianglelist); 
@@ -277,6 +277,6 @@
   dimensions[0] = out.numberofpoints;
   dimensions[1] = 2;   
-  genpointlist = (PyArrayObject *) PyArray_FromDimsAndData(2,
-					 dimensions,
+  genpointlist = (PyArrayObject *) PyArray_SimpleNewFromData(2,
+					 (npy_intp*) dimensions,
 					 PyArray_DOUBLE, 
 					 (char*) out.pointlist);
@@ -285,6 +285,6 @@
   /* Add point marker list */
   dimensions[0] = out.numberofpoints;
-  genpointmarkerlist = (PyArrayObject *) PyArray_FromDimsAndData(1, 
-				  	 dimensions, 
+  genpointmarkerlist = (PyArrayObject *) PyArray_SimpleNewFromData(1, 
+				  	 (npy_intp*) dimensions, 
 				         PyArray_INT,
 				        (char*) out.pointmarkerlist);
@@ -293,6 +293,6 @@
   dimensions[0] = out.numberofpoints;
   dimensions[1] = out.numberofpointattributes;   
-  genpointattributelist = (PyArrayObject *) PyArray_FromDimsAndData(2, 
-					  dimensions, 
+  genpointattributelist = (PyArrayObject *) PyArray_SimpleNewFromData(2, 
+					  (npy_intp*) dimensions, 
 					  PyArray_DOUBLE,
 					  (char*) out.pointattributelist);
@@ -303,6 +303,6 @@
   dimensions[0] = out.numberoftriangles;
   dimensions[1] = out.numberoftriangleattributes;   
-  gentriangleattributelist = (PyArrayObject *) PyArray_FromDimsAndData(2, 
-					   dimensions, 
+  gentriangleattributelist = (PyArrayObject *) PyArray_SimpleNewFromData(2, 
+					   (npy_intp*) dimensions, 
 					   PyArray_DOUBLE,
 					  (char*)out.triangleattributelist);
@@ -311,6 +311,6 @@
   dimensions[0] = out.numberofsegments;
   dimensions[1] = 2;   
-  gensegmentlist = (PyArrayObject *) PyArray_FromDimsAndData(2, 
-						    dimensions, 
+  gensegmentlist = (PyArrayObject *) PyArray_SimpleNewFromData(2, 
+						    (npy_intp*) dimensions, 
 						    PyArray_INT,
 						    (char*)out.segmentlist);
@@ -319,6 +319,6 @@
   /* Add segment marker list */
   dimensions[0] = out.numberofsegments;
-  gensegmentmarkerlist = (PyArrayObject *) PyArray_FromDimsAndData(1, 
-					    dimensions, 
+  gensegmentmarkerlist = (PyArrayObject *) PyArray_SimpleNewFromData(1, 
+					    (npy_intp*) dimensions, 
 					    PyArray_INT,
 					   (char*)out.segmentmarkerlist);
@@ -328,6 +328,6 @@
     dimensions[0] = out.numberoftriangles;
     dimensions[1] = 3;   
-    genneighborlist = (PyArrayObject *) PyArray_FromDimsAndData(2, 
-					 	 dimensions, 
+    genneighborlist = (PyArrayObject *) PyArray_SimpleNewFromData(2, 
+					 	 (npy_intp*) dimensions, 
 					      	 PyArray_INT,
 					       	 (char*)out.neighborlist);
@@ -335,7 +335,8 @@
     dimensions[0] = 0;
     dimensions[1] = 0;   
-    genneighborlist = (PyArrayObject *) PyArray_FromDims(2, 
-							 dimensions, 
-							 PyArray_INT);
+    genneighborlist = (PyArrayObject *) PyArray_ZEROS(2, 
+						 (npy_intp*) dimensions, 
+						 PyArray_INT,
+						 0);
   }
   
Index: /branches/numpy/anuga/shallow_water/shallow_water_ext.c
===================================================================
--- /branches/numpy/anuga/shallow_water/shallow_water_ext.c	(revision 6737)
+++ /branches/numpy/anuga/shallow_water/shallow_water_ext.c	(revision 6738)
@@ -1626,5 +1626,5 @@
   // Allocate space for return vector r (don't DECREF)
   dimensions[0] = 3;
-  r = (PyArrayObject *) PyArray_FromDims(1, dimensions, PyArray_DOUBLE);
+  r = (PyArrayObject *) PyArray_ZEROS(1, (npy_intp*) dimensions, PyArray_DOUBLE, 0);
 
   // Copy
Index: /branches/numpy/anuga/shallow_water/urs_ext.c
===================================================================
--- /branches/numpy/anuga/shallow_water/urs_ext.c	(revision 6737)
+++ /branches/numpy/anuga/shallow_water/urs_ext.c	(revision 6738)
@@ -788,5 +788,5 @@
     dimensions[1] = num_ts + POFFSET;
     
-    pydata = (PyArrayObject*) PyArray_FromDims(2, dimensions, PyArray_DOUBLE);
+    pydata = (PyArrayObject*) PyArray_ZEROS(2, (npy_intp*) dimensions, PyArray_DOUBLE, 0);
     if(pydata == NULL)
     {
Index: /branches/numpy/anuga/utilities/sparse_ext.c
===================================================================
--- /branches/numpy/anuga/utilities/sparse_ext.c	(revision 6737)
+++ /branches/numpy/anuga/utilities/sparse_ext.c	(revision 6738)
@@ -136,5 +136,5 @@
     //Allocate space for return vectors y (don't DECREF) 
     dimensions[0] = M;
-    y = (PyArrayObject *) PyArray_FromDims(1, dimensions, PyArray_DOUBLE);
+    y = (PyArrayObject *) PyArray_ZEROS(1, (npy_intp*) dimensions, PyArray_DOUBLE, 0);
   
     err = _csr_mv(M,
@@ -159,5 +159,5 @@
     dimensions[0] = M;                   //Number of rows in sparse matrix  
     dimensions[1] = columns;
-    y = (PyArrayObject *) PyArray_FromDims(2, dimensions, PyArray_DOUBLE);
+    y = (PyArrayObject *) PyArray_ZEROS(2, (npy_intp*) dimensions, PyArray_DOUBLE, 0);
     
     err = _csr_mm(M, columns,
