[Numpy-discussion] Re: Precision changes to sin/cos in the next release?

2023-05-31 Thread David Menéndez Hurtado
On Wed, 31 May 2023, 22:41 Robert Kern, wrote: > Not sure anyone really uses tanh for serious work. > At the risk of derailing the discussion, the case I can think of (but kind of niche) is using neural networks to approximate differential equations. Then you need non linearities in the gradien

[Numpy-discussion] Re: Precision changes to sin/cos in the next release?

2023-05-31 Thread David Menéndez Hurtado
What about having a np.fastmath module for faster, lower precision implementations? The error guarantees there would be lower, and possibly hardware dependent. By default we get the high precision version, but if the user knows what they are doing, they can get the speed. /David On Wed, 31 May 20

[Numpy-discussion] Re: non normalised eigenvectors

2023-02-25 Thread David Menéndez Hurtado
On Sat, 25 Feb 2023 at 20:09, Louis Petingi wrote: > Thank you for the reply. I am working with the Laplacian matrix of a graph > which is the Degree matrix minus the adjacency matrix. > The Laplacian is a symmetric matrix and the smallest eigenvalue is zero. > As the rows add it to 0, Lx=0x, and

[Numpy-discussion] Re: Speeding up `unique` and adding "kind" parameter

2022-06-28 Thread David Menéndez Hurtado
On Tue, 28 Jun 2022, 6:50 pm Ralf Gommers, wrote: > > >> ``` >> kind : {None, 'sort', 'table'}, optional >> > > Regarding the name, `'table'` is an implementation detail. The end user > should not have to care what the data structure is that is used. I suggest > to use something like "unsorte

[Numpy-discussion] Re: NEP 29 and the faster Python release cadence

2022-05-25 Thread David Menéndez Hurtado
On Wed, 25 May 2022, 4:54 pm Thomas Caswell, wrote: > > Stealing some language/concepts from Microsoft (if I recall it correctly), > we should sort out which entries in that support matrix are Level 1 (CI + > wheels), Level 2 (CI), Level 3 (we test something that looks like this), > and Level 4 (

[Numpy-discussion] Re: [Feature Request] Add alias of np.concatenate as np.concat

2022-05-10 Thread David Menéndez Hurtado
I don't have any opinion on whether this is a good idea or not, but in the meantime, you can monkey-patch numpy: np.concat = np.concatenate And you get your compatibility. And, since modules are singletons, I believe you only have to do it once and it will propagate across your modules. /David

[Numpy-discussion] Re: NEP draft for the future behaviour of scalar promotion

2022-02-21 Thread David Menéndez Hurtado
On Tue, 22 Feb 2022, 6:53 am Stefan van der Walt, wrote: > On Mon, Feb 21, 2022, at 20:56, Juan Nunez-Iglesias wrote: > > > the > > latter would seem consistent with the "principle of least surprise" when > moving from a typed language to > > NumPy work perhaps, though arguably slightly less user

Re: [Numpy-discussion] EHN: Discusions about 'add numpy.topk'

2021-05-29 Thread David Menéndez Hurtado
On Sat, 29 May 2021, 4:29 pm Ralf Gommers, wrote: > > > On Fri, May 28, 2021 at 4:58 PM wrote: > >> Hi all, >> >> Finding topk elements is widely used in several fields, but missed in >> NumPy. >> I implement this functionality named as numpy.topk using core numpy >> functions and open a PR: >>

Re: [Numpy-discussion] C-coded dot 1000x faster than numpy?

2021-02-23 Thread David Menéndez Hurtado
On Tue, 23 Feb 2021, 7:41 pm Roman Yurchak, wrote: > For the first benchmark apparently A.dot(B) with A real and B complex is > a known issue performance wise https://github.com/numpy/numpy/issues/10468 I splitted B into a vector of size (N, 2) for the real and imaginary part, and that makes th