[Numpy-discussion] Re: help

2024-10-03 Thread Klaus Zimmermann
Hi Usha, as Matti pointed out, your pandas and numpy are not compatible. That maybe because either one of those is not coming from where you think it is. >From the error we know that Pandas comes from E:\anaconda3\Lib\site-packages\pandas. Can you do ``` import numpy as np print(np.__file__) ``` T

[Numpy-discussion] Re: Applying a function on local environments

2024-07-27 Thread Klaus Zimmermann
Dear Thomas, I think you might be able to do this with https://numpy.org/doc/stable/reference/generated/numpy.lib.stride_tricks.sliding_window_view.html Kind regards Klaus On Fri, Jul 26, 2024 at 2:51 PM wrote: > Dear all, > > my goal would be to apply some function on a local environment of s

[Numpy-discussion] Re: Curious performance different with np.unique on arrays of characters

2023-09-29 Thread Klaus Zimmermann
Hi, one thing that's been on my mind about this discussion: Isn't sorting strings simply a much harder job? Particularly Unicode strings? Cheers Klaus On 27/09/2023 13:12, Lyla Watts wrote: Could you share the processor you're currently running this on? I ask because np.sort leverages AVX-

[Numpy-discussion] Re: dropping support for Gitpod and our Docker image builds

2023-03-21 Thread Klaus Zimmermann
Hi, this sounds all reasonable to me, and as mostly a lurker on this list my input shouldn't carry too much weight anyway. I wanted to point out one thing: Docker does continue to offer free access for Open Source projects, it's just that they restructured the way of how to do this. So if th

[Numpy-discussion] Re: representation of valid float type range

2022-01-10 Thread Klaus Zimmermann
Hello, perhaps it would be best to have an issue about this on github? It might be worth pointing out that the original problem triggers a floating point error that can be caught and handled via errstate. This might be used either in linspace itself, or, if you think this rare problem is like

[Numpy-discussion] Re: representation of valid float type range

2022-01-01 Thread Klaus Zimmermann
Hi Lev, all, your explanation makes perfect sense, but shouldn't this be considered a bug in `linspace`? Best Klaus On 29/12/2021 18:15, Lev Maximov wrote: • Short answer: It's because >>> f64_info.max - f64_info.min inf • Long answer: linspace(a,b,n) tries to calculate the step by (b-a

Re: [Numpy-discussion] Best fit linear piecewise function?

2021-06-03 Thread Klaus Zimmermann
Hi Christopher, if you are interested in the 1d problem, you might also consider a spline fit of order 1, for example with scipy.interpolate, see [1]. Cheers Klaus [1] https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#spline-interpolation-in-1-d-procedural-interpolate-splxxx