[Numpy-discussion] two questions about `choose`

Robert Kern robert.kern at gmail.com
Mon Apr 19 13:16:55 EDT 2021


On Mon, Apr 19, 2021 at 12:24 PM bas van beek <bas.vanbeek at hotmail.com>
wrote:

> After a taking a closer look at the `np.choose` docs I think we should
> change `*choices: npt.ArrayLike` into `choices: Sequence[npt.ArrayLike]`.*
>
>
>
> *This would resolve the issue, but it’d also mean that directly passing an
> array will be prohibited (as far as type checkers are concerned).*
>
> *The docs do mention that the outermost container should be a list or
> tuple anyway, so I’m not convinced that this new typing restriction would
> be a huge loss.*
>

Why not allow both?

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/numpy-discussion/attachments/20210419/ee7317d9/attachment.html>


More information about the NumPy-Discussion mailing list