Removal of Deprecated Keywords/functionality
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
On Jun 20, 2015 1:43 PM, "Charles R Harris" <charlesr.harris@gmail.com> wrote:
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.
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
On Sat, Jun 20, 2015 at 3:32 PM, Nathaniel Smith <njs@pobox.com> wrote:
On Jun 20, 2015 1:43 PM, "Charles R Harris" <charlesr.harris@gmail.com> wrote:
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.
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
Note that the "skiprows" keyword is still used in loadtxt. It should probably be deprecated
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, 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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBCAAGBQJVhoKrAAoJEBn0X+vcm0Y7QV0P/1Yvi3BXGHumFgjCu+dLqez7 y9rLjRDc5tgTXN0LFYsUcnRcrcwLrkDS2q95upy0HXGI+sYQKAfBvpCWcjTht657 VWCcS71jXZNU0YCwumTUEi815I2jGSV1WA2t6ckfCMiw19ePcYNSHbw4qbHHdxuw ZEncX8kJZ6/fKrY+0F2HJo0CGp+Wmn1f6Jzk/5sjaRFdy/g8GE9Txcrfr+i63uWt w1BGBziHkCR15AHS/LFs9/lWOPmfeoW8Wz+qErZ4m75WECOjbSXSOVaaWIaKWb9Z mkoVyt+0OSoTI0coUqkrl2Cju0vkSK7i+3+uM9dHcqkhlgNuFhHGoamtdg8yHrl8 RYMXgo7R0cZ2n6IJnS49vmbXiC5YeTlQ1HWeU+H2ZqJ00ZGNQBClrwhcNt6STCxP 8R1tp2UnmEYJq7JTtVppCLxowvPjOIL0K9xkCLEsM+AlEQq+e4RFMOgtAo5ptqZy kPgP9GWbMY160g4DirWn9VZdfzb3Jyh9tI0r8mL4uCzsrBZHqVgO8K8p2Gth6NsO 3fW2oGdSbRGLD/DlmK7h8X7VqrffcUCi1D21ZEmzZ/Yey9YxaEkhXw9H3dPC9AwD f1UGvAGrTz5nT7x9gctEJWyYCN0QTwuq1z0PV8qbn6/UG/ujv+OVLvXtZ5jTySvq YF6Ylhk1Bza4A5eiqXBw =Jb9N -----END PGP SIGNATURE-----
On 21/06/15 01:07, Charles R Harris wrote:
On Sat, Jun 20, 2015 at 3:32 PM, Nathaniel Smith <njs@pobox.com <mailto:njs@pobox.com>> wrote:
On Jun 20, 2015 1:43 PM, "Charles R Harris" <charlesr.harris@gmail.com <mailto:charlesr.harris@gmail.com>> wrote: > > 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
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
On Jun 20, 2015, at 5:32 PM, Nathaniel Smith <njs@pobox.com> wrote:
On Jun 20, 2015 1:43 PM, "Charles R Harris" <charlesr.harris@gmail.com <mailto:charlesr.harris@gmail.com>> wrote:
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.
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 NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On Mon, Jun 22, 2015 at 12:48 AM, Honi Sanders <honi@brandeis.edu> wrote:
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.
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
Honi
On Jun 20, 2015, at 5:32 PM, Nathaniel Smith <njs@pobox.com> wrote:
On Jun 20, 2015 1:43 PM, "Charles R Harris" <charlesr.harris@gmail.com> wrote:
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.
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 NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (6)
-
Charles R Harris
-
Daniele Nicolodi
-
Honi Sanders
-
Nathaniel Smith
-
Ralf Gommers
-
Sebastian