[Numpy-discussion] Keyword argument order changed in records.py
oliphant.travis at ieee.org
Tue Jul 11 00:45:49 CDT 2006
In an effort to preserve consistency, I made a change to the keyword
argument order in the functions in records.py. In addition, all of the
functions now take a dtype= keyword argument. This keyword argument is
placed first along with other needed keyword arguments.
When the dtype keyword is given then it's argument is converted to a
data-type object and
used in the record array.
Otherwise (and only when dtype=None) the formats, names, titles,
aligned, and byteorder arguments are
used to construct the data-type object. These arguments are always last
in the keyword argument order.
Bascially, when these are given the rec.format_parser class is run to
construct a data-type object from them:
Thus using these keywords in place of data-type is equivalent to
dtype = format_parser(formats, names, titles, aligned, byteorder)._descr
Please let me know if this causes problems. As long as you used keyword
arguments, the changes should have no effect on code written for NumPy.
More information about the Numpy-discussion