[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-11 Thread Ralf Gommers via NumPy-Discussion
On Tue, Nov 11, 2025 at 2:48 PM Veit Heller wrote: > As another point of consideration, I also contributed changes to > PyWavelets, Pandas, and scikit-image to replace all occurrences of `np.fix` > with `np.trunc`, so that might also help further things along. > Thanks a lot for those contributi

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-11 Thread Veit Heller
As another point of consideration, I also contributed changes to PyWavelets, Pandas, and scikit-image to replace all occurrences of `np.fix` with `np.trunc`, so that might also help further things along. I would have made more broad contributions, but GitHub unfortunately limits the number of s

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-10 Thread Stefan van der Walt via NumPy-Discussion
On Mon, Nov 10, 2025, at 11:29, Ralf Gommers via NumPy-Discussion wrote: > I agree with this concern. It's not *that* much and the code is trivially > fixable by replacing `fix` with `trunc`. So a slow deprecation with removal > in a 3.0 release would already be quite conservative compared to our

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-10 Thread Ralf Gommers via NumPy-Discussion
On Sat, Nov 8, 2025 at 12:15 PM sebastian wrote: > On 2025-11-07 02:58, Stefan van der Walt via NumPy-Discussion wrote: > > On Mon, Nov 3, 2025, at 12:29, Nathan via NumPy-Discussion wrote: > > > >> Ralf rightly pointed out > >> > > (https://github.com/numpy/numpy/pull/30098#pullrequestreview-340

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-08 Thread sebastian
On 2025-11-07 02:58, Stefan van der Walt via NumPy-Discussion wrote: On Mon, Nov 3, 2025, at 12:29, Nathan via NumPy-Discussion wrote: Ralf rightly pointed out (https://github.com/numpy/numpy/pull/30098#pullrequestreview-3408343827) that np.fix does have substantial downstream usage and that

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-07 Thread Nathan via NumPy-Discussion
On Thu, Nov 6, 2025 at 6:59 PM Stefan van der Walt wrote: > On Mon, Nov 3, 2025, at 12:29, Nathan via NumPy-Discussion wrote: > > Ralf rightly pointed out ( > https://github.com/numpy/numpy/pull/30098#pullrequestreview-3408343827) > that np.fix does have substantial downstream usage and that a de

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-06 Thread Stefan van der Walt via NumPy-Discussion
On Mon, Nov 3, 2025, at 12:29, Nathan via NumPy-Discussion wrote: > Ralf rightly pointed out > (https://github.com/numpy/numpy/pull/30098#pullrequestreview-3408343827) that > np.fix does have substantial downstream usage and that a deprecation needs to > go through the mailing list, so I'm raisi

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-06 Thread Joren Hammudoglu via NumPy-Discussion
Done: https://github.com/numpy/numpy/pull/30168 ___ NumPy-Discussion mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/numpy-discussion.python.org Member a

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-06 Thread Nathan via NumPy-Discussion
I agree. We haven’t heard any objections to this proposal. Joren, why don’t you open a PR to add the pending deprecation to the type stubs? On Mon, Nov 3, 2025 at 11:46 PM matti picus via NumPy-Discussion < [email protected]> wrote: > > > On Tue, Nov 4, 2025 at 12:40 AM Joren Hammudoglu

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-03 Thread matti picus via NumPy-Discussion
On Tue, Nov 4, 2025 at 12:40 AM Joren Hammudoglu via NumPy-Discussion < [email protected]> wrote: > How about we decorate np.fix in the stubs (and only in the stubs) with > > @deprecated("will be deprecated in 2.5", > category=PendingDeprecationWarning) > def fix(...): ... > > and put th

[Numpy-discussion] Re: Deprecating numpy.fix

2025-11-03 Thread Joren Hammudoglu via NumPy-Discussion
How about we decorate np.fix in the stubs (and only in the stubs) with @deprecated("will be deprecated in 2.5", category=PendingDeprecationWarning) def fix(...): ... and put that in 2.4.0? [docs](https://typing-extensions.rtfd.io/#typing_extensions.deprecated) That way static type-checkers will