Re: [Numpy-discussion] Looking for a difference between Numpy 0.19.5 and 0.20 explaining a perf regression with Pythran

2021-03-12 Thread Sebastian Berg
On Fri, 2021-03-12 at 21:36 +0100, PIERRE AUGIER wrote: > Hi, > > I'm looking for a difference between Numpy 0.19.5 and 0.20 which > could explain a performance regression (~15 %) with Pythran. > > I observe this regression with the script >

[Numpy-discussion] Documentation Team meeting - Monday March 15 (Beware of Daylight Saving Time!)

2021-03-12 Thread Melissa Mendonça
Hi all! Our next Documentation Team meeting will be on *Monday, March 15* at ***4PM UTC*** (This has probably changed for you if you have recently gone through a DST change). All are welcome - you don't need to already be a contributor to join. If you have questions or are curious about what

[Numpy-discussion] Looking for a difference between Numpy 0.19.5 and 0.20 explaining a perf regression with Pythran

2021-03-12 Thread PIERRE AUGIER
Hi, I'm looking for a difference between Numpy 0.19.5 and 0.20 which could explain a performance regression (~15 %) with Pythran. I observe this regression with the script https://github.com/paugier/nbabel/blob/master/py/bench.py Pythran reimplements Numpy so it is not about Numpy code for

Re: [Numpy-discussion] Programmatically contracting multiple tensors

2021-03-12 Thread Eric Wieser
Einsum has a secret integer argument format that appears in the Examples section of the `np.einsum` docs, but appears not to be mentioned at all in the parameter listing. Eric On Sat, 13 Mar 2021 at 00:25, Michael Lamparski wrote: > Greetings, > > I have something in my code where I can

Re: [Numpy-discussion] Looking for a difference between Numpy 0.19.5 and 0.20 explaining a perf regression with Pythran

2021-03-12 Thread PIERRE AUGIER
Hi, I tried to compile Numpy with `pip install numpy==1.20.1 --no-binary numpy --force-reinstall` and I can reproduce the regression. Good news, I was able to reproduce the difference with only Numpy 1.20.1. Arrays prepared with (`df` is a Pandas dataframe) arr = df.values.copy() or arr =

Re: [Numpy-discussion] Looking for a difference between Numpy 0.19.5 and 0.20 explaining a perf regression with Pythran

2021-03-12 Thread Sebastian Berg
On Sat, 2021-03-13 at 00:33 +0100, PIERRE AUGIER wrote: > Hi, > > I tried to compile Numpy with `pip install numpy==1.20.1 --no-binary > numpy --force-reinstall` and I can reproduce the regression. > > Good news, I was able to reproduce the difference with only Numpy > 1.20.1. > > Arrays

Re: [Numpy-discussion] Looking for a difference between Numpy 0.19.5 and 0.20 explaining a perf regression with Pythran

2021-03-12 Thread Eric Firing
On 2021/03/12 1:33 PM, PIERRE AUGIER wrote: arr.copy() or np.copy(arr) do not give the same result, with arr obtained from a Pandas dataframe with arr = df.values. It's strange because type(df.values) gives so I would expect arr.copy() and np.copy(arr) to give exactly the same result.

Re: [Numpy-discussion] Programmatically contracting multiple tensors

2021-03-12 Thread Andras Deak
On Sat, Mar 13, 2021 at 1:32 AM Eric Wieser wrote: > > Einsum has a secret integer argument format that appears in the Examples > section of the `np.einsum` docs, but appears not to be mentioned at all in > the parameter listing. It's mentioned (albeit somewhat cryptically) sooner in the

[Numpy-discussion] Programmatically contracting multiple tensors

2021-03-12 Thread Michael Lamparski
Greetings, I have something in my code where I can receive an array M of unknown dimensionality and a list of "labels" for each axis. E.g. perhaps I might get an array of shape (2, 47, 3, 47, 3) with labels ['spin', 'atom', 'coord', 'atom', 'coord']. For every axis that is labeled "coord", I