Hi, I wish I could subclass ndarray so that I can use the ufuncs, but that I could ensure the array remains Fortran contiguous, and that the number of dimension is always 3 (even if the dtype can be more complex than a simple numerical type).
My intention is to deal with fields that can be scalar, vectorial or even tensorial, but it must stay compatible with a library we are using that assumes 3D problems with column-major order, and some more attributes concerning spatial steps, strides and comments... I have been looking at __array_{wrap, prepare, finalize}__ methods. I would believe __array_prepare__ would be the good starting point to impose the 'F'-ordered array and atleast_3d, but the point is that I don't know at that time if the ufunc will transform the datatype (from vector to scalar, from int to float, etc...) Some thought? Regards -- Fabrice Silva _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion