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

Kirill Balunov kirillbalunov at gmail.com
Tue Dec 12 15:06:58 EST 2017


Oh, sorry for noise...

With kind regards, -gdg

On Dec 12, 2017 23:05, "Robert Kern" <robert.kern at gmail.com> wrote:

> 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
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20171212/dacfed6b/attachment-0001.html>


More information about the NumPy-Discussion mailing list