[Numpy-discussion] Exact semantics of ufunc.reduce
Hello! I’m trying to investigate the exact way ufunc.reduce works when given a custom dtype. Does it cast before or after the operation, or somewhere in between? How does this differ from ufunc.reduceat, for example? We ran into this issue in pydata/sparse#191 (https://github.com/pydata/sparse/issues/191) when trying to match the two where the only thing differing is the number of zeros for sum, which shouldn’t change the result. Best Regards, Hameer Abbasi ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] BIDS/NumPy dev meetings, Wednesdays 12pm Pacific
On Thu, Oct 11, 2018 at 10:44 PM Stefan van der Walt wrote: > Hi everyone, > > The team at BIDS meets once a week to discuss progress, priorities, and > roadblocks. While our priorities are broadly determined by the project > roadmap [0], we would like to provide an opportunity for the community > to give more regular and detailed feedback on our work. > > We therefore invite you to join us for our weekly calls, > each **Wednesday from 12:00 to 13:00 Pacific Time**. > > Detail of the next meeting (2018-10-17) is given in the agenda [1], > which is a growing document—feel free to add topics you wish to discuss. > > We hope to see you there! I will send another reminder next week. > Sounds like a good idea, thanks for doing this. I'm unlikely to make the first two meetings, but will try to join when I can after that. Cheers, Ralf > Best regards, > Stéfan > > > [0] https://www.numpy.org/neps/index.html > [1] https://hackmd.io/YZfpGn5BSu6acAFLBaRjtw# > ___ > NumPy-Discussion mailing list > NumPy-Discussion@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion > ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Exact semantics of ufunc.reduce
On Fri, 2018-10-12 at 17:34 +0200, Hameer Abbasi wrote: > Hello! > > I’m trying to investigate the exact way ufunc.reduce works when given > a custom dtype. Does it cast before or after the operation, or > somewhere in between? How does this differ from ufunc.reduceat, for > example? > I am not 100% sure, but I think giving the dtype definitely casts the output type. And since most ufunc loops are defined as "ff->f", etc. that effectively casts the input as well. It might be it casts the input specifically, but I doubt it. The cast will occur within the buffering machinery, so the cast is only done in small chunks. But the operation itself should be performed using the given dtype. - Sebastian > We ran into this issue in pydata/sparse#191 when trying to match the > two where the only thing differing is the number of zeros for sum, > which shouldn’t change the result. > > Best Regards, > Hameer Abbasi > > > ___ > NumPy-Discussion mailing list > NumPy-Discussion@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion signature.asc Description: This is a digitally signed message part ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion