[Numpy-discussion] What is the pythonic way to write a function that handles arrays and scalars?

Robert Kern robert.kern at gmail.com
Tue Dec 12 15:03:58 EST 2017


On Wed, Dec 13, 2017 at 5:00 AM, Kirill Balunov <kirillbalunov at gmail.com>
wrote:
>
> On minor thing that instead of 'ret' there should be 'x'.

No, `x` is the input. The code that actually does the computation (elided
here by the `# The magic happens here` comment) would have assigned to
`ret`.

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20171213/5a02089c/attachment.html>


More information about the NumPy-Discussion mailing list