Hi, If you setup an M x N array like this
a = 1.0*numpy.arange(24).reshape(8,3) you can access the data from a C function like this void foo(PyObject * numpy_data) { // Get dimension and data pointer int const m = static_cast<int>(PyArray_DIMS(numpy_data)[0]); int const n = static_cast<int>(PyArray_DIMS(numpy_data)[1]); double * const data = (double *) PyArray_DATA(numpy_data); // Access data ... } Now, suppose I have an irregular shaped numpy array like this a1 = numpy.array([ 1.0, 2.0, 3.0]) a2 = numpy.array([-2.0, 4.0]) a3 = numpy.array([5.0]) b = numpy.array([a1,a2,a3]) How can open up the doors to the array data of b on the C-side? Best regards, Mads -- +---------------------------------------------------------+ | Mads Ipsen | +----------------------+----------------------------------+ | Gåsebæksvej 7, 4. tv | phone: +45-29716388 | | DK-2500 Valby | email: mads.ip...@gmail.com | | Denmark | map : www.tinyurl.com/ns52fpa | +----------------------+----------------------------------+ _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion