Discussion:
[Numpy-discussion] Removal of Deprecated Keywords/functionality
Charles R Harris
2015-06-20 20:40:05 UTC
Permalink
Hi All,

There are three long ago deprecations that I am not sure how to handle.


- keywords skiprows and missing in genfromtxt, deprecated in 1.5.
- keyword old_behavior (default False) in correlate. added in 1.5 at
least, but default value changed later.

The documentation says they will be removed in numpy 2.0, but we might want
to try ealier. The case of the correlation function is trickier, as we
probabaly need to provide a function with the old behavior before removing
the keyword. I've left these cases as is, but the more old stuff hanging
about the greater our technical debt.


Chuck
Nathaniel Smith
2015-06-20 21:32:11 UTC
Permalink
Post by Charles R Harris
Hi All,
There are three long ago deprecations that I am not sure how to handle.
keywords skiprows and missing in genfromtxt, deprecated in 1.5.
keyword old_behavior (default False) in correlate. added in 1.5 at least,
but default value changed later.
Post by Charles R Harris
The documentation says they will be removed in numpy 2.0, but we might
want to try ealier. The case of the correlation function is trickier, as we
probabaly need to provide a function with the old behavior before removing
the keyword.

Wouldn't this function just be
correlate(a, conj(b))
? Surely just writing that is easier and clearer than any function call we
could provide.
Post by Charles R Harris
I've left these cases as is, but the more old stuff hanging about the
greater our technical debt.

I guess we could try dropping them from the first release candidate and at
least get some data on whether anyone notices.

1.5 was a lonnnng time ago.

-n
Charles R Harris
2015-06-20 23:07:49 UTC
Permalink
Post by Charles R Harris
Post by Charles R Harris
Hi All,
There are three long ago deprecations that I am not sure how to handle.
keywords skiprows and missing in genfromtxt, deprecated in 1.5.
keyword old_behavior (default False) in correlate. added in 1.5 at
least, but default value changed later.
Post by Charles R Harris
The documentation says they will be removed in numpy 2.0, but we might
want to try ealier. The case of the correlation function is trickier, as we
probabaly need to provide a function with the old behavior before removing
the keyword.
Wouldn't this function just be
correlate(a, conj(b))
? Surely just writing that is easier and clearer than any function call we
could provide.
Post by Charles R Harris
I've left these cases as is, but the more old stuff hanging about the
greater our technical debt.
I guess we could try dropping them from the first release candidate and at
least get some data on whether anyone notices.
1.5 was a lonnnng time ago.
I just removed all of these cases (in separate commits). We will see what
happens. Note that the
"skiprows" keyword is still used in loadtxt. It should probably be
deprecated there for consistency, but it is possible that some use it as a
positional argument.

Chuck
Sebastian
2015-06-21 09:23:55 UTC
Permalink
Hi,
Note that the "skiprows" keyword is still used in loadtxt. It should probably be deprecated
there for consistency, but it is possible that some use it as a
positional argument.

skiprows is t the only argument of loadtxt that allows skipping a header
or other data at the beginning, which do not start with #. This is often
the case with data from measurement device and software. Sometimes these
lines are also used to give informations about the circumstances or the
probe in a non-CSV and non-tab-separated style.

Sebastian,
--
python programming - mail server - photo - video - https://sebix.at
To verify my cryptographic signature or send me encrypted mails, get my
key at https://sebix.at/DC9B463B.asc and on public keyservers.
Daniele Nicolodi
2015-06-21 09:29:45 UTC
Permalink
On Jun 20, 2015 1:43 PM, "Charles R Harris"
Post by Charles R Harris
Hi All,
There are three long ago deprecations that I am not sure how to handle.
keywords skiprows and missing in genfromtxt, deprecated in 1.5.
I believe you mean skip_rows here, which got replaced by skip_header.
Note that the "skiprows" keyword is still used in loadtxt. It should
probably be deprecated there for consistency, but it is possible that
some use it as a positional argument.
The interface of loadtxt and genfromtxt are rather different, why would
only this discrepancy be a problem? As far as I know there is no
replacement for the skiprows argument in loadtxt and it is definitely an
useful feature.

Cheers,
Daniele
Honi Sanders
2015-06-21 22:48:07 UTC
Permalink
OK. So I am in the midst of a pull request adding a “maxlag” mode to correlate (https://github.com/numpy/numpy/compare/master...bringingheavendown:maxlag). Am I to understand that I no longer need to preserve the old_behavior functionality? Is it possible that we could address my pull request and then remove the old_behavior functionality because now my pull request is unmergeable.
Honi
Post by Nathaniel Smith
Post by Charles R Harris
Hi All,
There are three long ago deprecations that I am not sure how to handle.
keywords skiprows and missing in genfromtxt, deprecated in 1.5.
keyword old_behavior (default False) in correlate. added in 1.5 at least, but default value changed later.
The documentation says they will be removed in numpy 2.0, but we might want to try ealier. The case of the correlation function is trickier, as we probabaly need to provide a function with the old behavior before removing the keyword.
Wouldn't this function just be
correlate(a, conj(b))
? Surely just writing that is easier and clearer than any function call we could provide.
Post by Charles R Harris
I've left these cases as is, but the more old stuff hanging about the greater our technical debt.
I guess we could try dropping them from the first release candidate and at least get some data on whether anyone notices.
1.5 was a lonnnng time ago.
-n
_______________________________________________
NumPy-Discussion mailing list
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Ralf Gommers
2015-06-22 05:46:34 UTC
Permalink
Post by Honi Sanders
OK. So I am in the midst of a pull request adding a “maxlag” mode to
correlate (
https://github.com/numpy/numpy/compare/master...bringingheavendown:maxlag).
Am I to understand that I no longer need to preserve the old_behavior
functionality?
Indeed. It was scheduled for ripping out for a long time, and Chuck finally
got that done.
Post by Honi Sanders
Is it possible that we could address my pull request and then remove the
old_behavior functionality because now my pull request is unmergeable.
We can't undo the merge that made your PR need a rebase, but I'm happy to
help you with the rebase and getting that into your branch if needed.

Ralf
Post by Honi Sanders
Honi
Post by Charles R Harris
Hi All,
There are three long ago deprecations that I am not sure how to handle.
keywords skiprows and missing in genfromtxt, deprecated in 1.5.
keyword old_behavior (default False) in correlate. added in 1.5 at
least, but default value changed later.
Post by Charles R Harris
The documentation says they will be removed in numpy 2.0, but we might
want to try ealier. The case of the correlation function is trickier, as we
probabaly need to provide a function with the old behavior before removing
the keyword.
Wouldn't this function just be
correlate(a, conj(b))
? Surely just writing that is easier and clearer than any function call we could provide.
Post by Charles R Harris
I've left these cases as is, but the more old stuff hanging about the
greater our technical debt.
I guess we could try dropping them from the first release candidate and at
least get some data on whether anyone notices.
1.5 was a lonnnng time ago.
-n
_______________________________________________
NumPy-Discussion mailing list
http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________
NumPy-Discussion mailing list
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Loading...