From: Charles R H. <cha...@gm...> - 2006-10-18 22:19:46
|
On 10/18/06, Travis Oliphant <oli...@ee...> wrote: > > Charles R Harris wrote: > > > > > Could we make a few changes ;) > > > > For printing the flags I would suggest using C-Contiguous and > > F-Contiguous so folks don't have to read the book. And at the c level > > define alternates, i.e, #define c-contiguous contiguous or whatever. > > That way backward compatibility would be maintained but more > > descriptive names would be available. > > Printing the flags is not intended for the casual user. So, I'd like to > keep consistent with C-level names and the names that are printed. > > CONTIGUOUS is the old name Numeric used. It always meant C-CONTIGUOUS > and so that meaning is preserved. FORTRAN is the new one flag and it > means FORTRAN CONTIGUOUS. > > So, you want something like? > > #define NPY_C_CONTIGUOUS NPY_CONTIGUOUS > #define NPY_F_CONTIGUOUS NPY_FORTRAN > > and to have C_CONTIGUOUS and F_CONTIGUOUS print for the flags description? Yes, I think that would be more informative. I'm not opposed to it, but I don't really see the need. It's just a > semantic question. Given the history of CONTIGUOUS in Numeric I thought > it was clear that CONTIGUOUS always meant C-contiguous. Well, I knew that for numeric, but it was a good deal less obvious in combo with the order keyword. For instance, contiguous could change its meaning to match up with FORTRAN, so that FORTRAN=True and CONTIGUOUS=True meant Fortran contiguous, which was sort of what I was thinking. Explicit never hurts. Chuck |