On Wed, Mar 14, 2018 at 9:44 AM, Hameer Abbasi <einstein.edi...@gmail.com> 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`. Writing it as a `gufunc` would be > going overboard, IMO. Writing it as a combination of `ufunc`s and avoiding > Numpy-specific stuff should be good enough.
My mistake - I thought the result was reduced, but you only need a reduction along the way. Writing this in terms of standard functions is certainly fine! -- Marten _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion