[Numpy-discussion] Remove deprecated skiprows

Skipper Seabold jsseabold at gmail.com
Tue Apr 5 18:11:12 EDT 2011


On Tue, Apr 5, 2011 at 6:05 PM, Pierre GM <pgmdevlist at gmail.com> wrote:
>
> On Apr 5, 2011, at 11:52 PM, Ralf Gommers wrote:
>
>> On Tue, Apr 5, 2011 at 11:45 PM, Skipper Seabold <jsseabold at gmail.com> wrote:
>>> On Sun, Apr 3, 2011 at 8:20 PM, Charles R Harris
>>> <charlesr.harris at gmail.com> wrote:
>>>> Should skiprows be removed?
>>>>
>>>>     if skiprows:
>>>>         warnings.warn(\
>>>>             "The use of `skiprows` is deprecated, it will be removed in
>>>> numpy 2.0.\n" \
>>>>             "Please use `skip_header` instead.",
>>>>             DeprecationWarning)
>>>>         skip_header = skiprows
>>>>
>>>> Its been deprecated since 1.4. Personally, I like skiprows better than
>>>> skip_header ;)
>>>>
>>>
>>> +1 for skiprows. I always have to look it up.
>>
>> To me one is not much better than the other, but -1 for skiprows
>> because un-deprecating it and deprecating skip_header is inconsistent
>> and annoying for users.
>
> -1 for skiprows. When  I introduced skip_footer, it looked more consistent to have a skip_header and skip_footer than a skiprows and a skip_footer.
> Now, we could probably find more meaningful names, like, skip_header_rows... OK, just joking.
>

I'm only slightly serious here, but inconsistent keywords are also
annoying for users. e.g. vs. numpy.loadtxt, though I know that the use
cases are slightly different. To my mind, skip_headers is a bool and
skiprows is (more general and) an int. Using R too much maybe.

Skipper



More information about the NumPy-Discussion mailing list