[Numpy-discussion] ENH: Proposal to add atleast_nd function

Stefan van der Walt stefanv at berkeley.edu
Tue Feb 16 18:25:03 EST 2021


On Tue, Feb 16, 2021, at 07:49, Joseph Fox-Rabinovitz wrote:
> I'm getting a generally lukewarm not negative response. Should we put it to a vote?

Things here don't typically get decided by vote—I think you'll have to build towards consensus.  It may be overkill to write a NEP, but outlining a proposed solution along with pros and cons and getting everyone on board is necessary.

The API surface is a touchy issue, and so it is difficult to get new features like these added.

Ralf has been working towards this idea, but having a well-organised namespace of utility functions outside of the core NumPy API would be helpful in allowing expansion and experimentation, without making the current situation worse (where we effectively have to support things forever).  As an example, take Cartesian product [0] and array combinations [1], which have been requested several times on StackOverflow, but there's nowhere to put them.

Stéfan

[0] https://stackoverflow.com/questions/1208118/using-numpy-to-build-an-array-of-all-combinations-of-two-arrays#comment22769580_1235363

[1] https://stackoverflow.com/questions/16003217/n-d-version-of-itertools-combinations-in-numpy/16008578#16008578
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/numpy-discussion/attachments/20210216/f1e6f93a/attachment.html>


More information about the NumPy-Discussion mailing list