-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Description
Proposed new feature or change:
I would like to ask you to reconsider the planned removal of the trapezoidal rule (currently trapz(), but see below about the name) in numpy v2, in favour of the equivalent in SciPy.
While trapz() is perhaps not in the first tier of numpy functions, it is not exactly rare, with np.trapz showing up around 20k times in a GitHub code search. Its implementation is a very simple pure Python function with an exceedingly stable interface, and I cannot imagine it is much of a maintenance burden.
While the functionality could be out-sourced to SciPy, the requirements for SciPy far exceed those of Numpy, and for a project not already using SciPy, it arguably makes more sense to copy and paste Numpy's soon-to-be-deprecated implementation than to add the quite heavy dependency on SciPy.
I understand that there has initially been an objection to the trapz() name, on the basis of derogatory connotations. Not being part of the affected group, I do not have an opinion on the name. But perhaps it would suffice to deprecate the old name in favour of a new one for the existing function, which would still be far less disruptive than complete removal of the functionality.