Re: [Numpy-discussion] ENH: softmax

2018-03-14 Thread Kulick, Johannes
Alright. Going for scipy.special then. Thanks for the quick answer. Cheers Johannes On 14.03.18, 19:03, "NumPy-Discussion on behalf of Marten van Kerkwijk" wrote: On Wed, Mar 14, 2018 at 9:44 AM, Hameer Abbasi wrote: > I possible, write it as a `gufunc`, so duck arrays can overri

Re: [Numpy-discussion] ENH: softmax

2018-03-14 Thread Marten van Kerkwijk
On Wed, Mar 14, 2018 at 9:44 AM, Hameer Abbasi wrote: > I possible, write it as a `gufunc`, so duck arrays can override with > `__array_ufunc__` if > > necessary. -- Marten > > Softmax is a very simple combination of elementary `ufunc`s with two inputs, > the weight vector `w` and the data `x`. Wr

Re: [Numpy-discussion] ENH: softmax

2018-03-14 Thread Hameer Abbasi
I possible, write it as a `gufunc`, so duck arrays can override with `__array_ufunc__` if necessary. -- Marten Softmax is a very simple combination of elementary `ufunc`s with two inputs, the weight vector `w` and the data `x`. Writing it as a `gufunc` would be going overboard, IMO. Writing it as

Re: [Numpy-discussion] ENH: softmax

2018-03-14 Thread Ralf Gommers
On Wed, Mar 14, 2018 at 1:41 AM, Robert Kern wrote: > On Wed, Mar 14, 2018 at 5:22 PM, Warren Weckesser < > warren.weckes...@gmail.com> wrote: > > > > On Wed, Mar 14, 2018 at 4:05 AM, Kulick, Johannes > wrote: > >> > >> Hi, > >> > >> I regularly need the softmax function (https://en.wikipedia.or

Re: [Numpy-discussion] ENH: softmax

2018-03-14 Thread Marten van Kerkwijk
I think this indeed makes most sense for scipy. I possible, write it as a `gufunc`, so duck arrays can override with `__array_ufunc__` if necessary. -- Marten ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/l

Re: [Numpy-discussion] ENH: softmax

2018-03-14 Thread Robert Kern
On Wed, Mar 14, 2018 at 5:22 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > > On Wed, Mar 14, 2018 at 4:05 AM, Kulick, Johannes wrote: >> >> Hi, >> >> I regularly need the softmax function ( https://en.wikipedia.org/wiki/Softmax_function) for my code. I have a quite efficient pure pyt

Re: [Numpy-discussion] ENH: softmax

2018-03-14 Thread Warren Weckesser
On Wed, Mar 14, 2018 at 4:05 AM, Kulick, Johannes wrote: > Hi, > > > > I regularly need the softmax function (https://en.wikipedia.org/ > wiki/Softmax_function) for my code. I have a quite efficient pure python > implementation (credits to Nolan Conaway). I think it would be a valuable > enhancem

[Numpy-discussion] ENH: softmax

2018-03-14 Thread Kulick, Johannes
Hi, I regularly need the softmax function (https://en.wikipedia.org/wiki/Softmax_function) for my code. I have a quite efficient pure python implementation (credits to Nolan Conaway). I think it would be a valuable enhancement of the ndarray class. But since it is kind of a specialty function