[Numpy-discussion] Re: Shape detection

2022-01-24 Thread Fabrice Silva
Le samedi 22 janvier 2022, pawel.dar...@gmail.com a écrit : > Hello, > > I am not sure that this is correct group for my problem but I hope > someone can help me :) > > I try to analyze picture with porous material > (https://python.neocast.eu/disc.png). I calculate a total quantity of > each por

[Numpy-discussion] Re: Performance mystery

2022-01-24 Thread Francesc Alted
On Mon, Jan 24, 2022 at 2:15 AM Warren Weckesser wrote: > Thanks Sebastian for pointing out that the issue is (minor) page > faults, and thanks Francesc for providing the links and the analysis > of the situation. After reading those links and experimenting with > malloc in a couple C programs,

[Numpy-discussion] Re: Performance mystery

2022-01-24 Thread Jonathan Fine
On Mon, Jan 24, 2022 at 10:02 AM Francesc Alted wrote: > Thanks for going down to the rabbit hole. It is now much clearer what's > going on. > > All in all, hats off to Warren for this entertaining piece of > investigation! > I can't resist. You'd expect someone called https://en.wikipedia.or

[Numpy-discussion] Re: Performance mystery

2022-01-24 Thread Francesc Alted
On Mon, Jan 24, 2022 at 11:01 AM Francesc Alted wrote: > On Mon, Jan 24, 2022 at 2:15 AM Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> Thanks Sebastian for pointing out that the issue is (minor) page >> faults, and thanks Francesc for providing the links and the analysis >> of the

[Numpy-discussion] Re: Proposal for new function to determine if a float contains an integer

2022-01-24 Thread Sebastian Berg
On Sun, 2022-01-23 at 14:12 -0800, Brock Mendel wrote: > Have any of the numpy devs weighed in on this?  If an efficient > version of > this were available in numpy there is a lot of pandas code I would > enjoy > ripping out. As this is a Python float method, that is an argument for implementing i

[Numpy-discussion] exp(NINF) returns underflow error after version 1.20

2022-01-24 Thread Michael Gutteridge
We have an interesting situation where a test suite that checks the value of e^-inf is behaving differently depending on Numpy version. The minimal test I'm using is: #!/usr/bin/env python3 import numpy as np np.seterr(under='raise') print(np.exp(np.NINF)) With numpy version 1.19.5 and 1.20.3

[Numpy-discussion] Re: exp(NINF) returns underflow error after version 1.20

2022-01-24 Thread Sebastian Berg
On Mon, 2022-01-24 at 19:37 +, Michael Gutteridge wrote: > We have an interesting situation where a test suite that checks the > value of e^-inf is behaving differently depending on Numpy version.  > The minimal test I'm using is: > > #!/usr/bin/env python3 > import numpy as np > np.seterr(und