[Numpy-discussion] Consider improving numpy.outer's behavior with zero-dimensional vectors
Neil Girdhar
mistersheik at gmail.com
Wed Apr 15 17:31:41 EDT 2015
Does it work for you to set
outer = np.multiply.outer
?
It's actually faster on my machine.
On Wed, Apr 15, 2015 at 5:29 PM, <josef.pktd at gmail.com> wrote:
> On Wed, Apr 15, 2015 at 7:35 AM, Neil Girdhar <mistersheik at gmail.com>
> wrote:
> > Yes, I totally agree. If I get started on the PR to deprecate np.outer,
> > maybe I can do it as part of the same PR?
> >
> > On Wed, Apr 15, 2015 at 4:32 AM, Sebastian Berg <
> sebastian at sipsolutions.net>
> > wrote:
> >>
> >> Just a general thing, if someone has a few minutes, I think it would
> >> make sense to add the ufunc.reduce thing to all of these functions at
> >> least in the "See Also" or "Notes" section in the documentation.
> >>
> >> These special attributes are not that well known, and I think that might
> >> be a nice way to make it easier to find.
> >>
> >> - Sebastian
> >>
> >> On Di, 2015-04-14 at 22:18 -0400, Nathaniel Smith wrote:
> >> > I am, yes.
> >> >
> >> > On Apr 14, 2015 9:17 PM, "Neil Girdhar" <mistersheik at gmail.com>
> wrote:
> >> > Ok, I didn't know that. Are you at pycon by any chance?
> >> >
> >> > On Tue, Apr 14, 2015 at 7:16 PM, Nathaniel Smith
> >> > <njs at pobox.com> wrote:
> >> > On Tue, Apr 14, 2015 at 3:48 PM, Neil Girdhar
> >> > <mistersheik at gmail.com> wrote:
> >> > > Yes, I totally agree with you regarding np.sum and
> >> > np.product, which is why
> >> > > I didn't suggest np.add.reduce, np.multiply.reduce.
> >> > I wasn't sure whether
> >> > > cumsum and cumprod might be on the line in your
> >> > judgment.
> >> >
> >> > Ah, I see. I think we should treat them the same for
> >> > now -- all the
> >> > comments I made apply to a lesser or greater extent
> >> > (in particular,
> >> > cumsum and cumprod both do the thing where they
> >> > dispatch to .cumsum()
> >> > .cumprod() method).
> >> >
> >> > -n
> >> >
> >> > --
> >> > Nathaniel J. Smith -- http://vorpus.org
> >> > _______________________________________________
> >> > NumPy-Discussion mailing list
> >> > NumPy-Discussion at scipy.org
> >> >
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >> >
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > NumPy-Discussion mailing list
> >> > NumPy-Discussion at scipy.org
> >> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >> >
> >> > _______________________________________________
> >> > NumPy-Discussion mailing list
> >> > NumPy-Discussion at scipy.org
> >> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >>
> >>
> >> _______________________________________________
> >> NumPy-Discussion mailing list
> >> NumPy-Discussion at scipy.org
> >> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >>
> >
> >
> > _______________________________________________
> > NumPy-Discussion mailing list
> > NumPy-Discussion at scipy.org
> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >
>
>
> I'm just looking at this thread.
>
> I see outer used quite often
>
> corrcoef = cov / np.outer(std, std)
>
> (even I use it sometimes instead of
> cov / std[:,None] / std
>
> Josef
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150415/119d395c/attachment.html>
More information about the NumPy-Discussion
mailing list