NumPy objects as seen from C

NumPy objects are C structs with attributes:

int nd: no of indices (dimensions)
int dimensions[nd]: length of each dimension
char *data: pointer to data
int strides[nd]: no of bytes between two successive data elements for a fixed index
Access element (i,j) by
a->data + i*a->strides[0] + j*a->strides[1]

previousnexttable of contents