NumPy-compatible multidimensional arrays in C++