[Numpy-discussion] Extending ufunc signature syntax for matmul, frozen dimensions

2018-04-29 Thread Matti Picus
In looking to solve issue #9028 "no way to override matmul/@ if __array_ufunc__ is set", it seems there is consensus around the idea of making matmul a true gufunc, but matmul can behave differently for different combinations of array and vector: (n,k),(k,m)->(n,m) (n,k),(k) -> (n) (k),(k,m)->

Re: [Numpy-discussion] Extending ufunc signature syntax for matmul, frozen dimensions

2018-04-29 Thread Marten van Kerkwijk
Hi Matti, This sounds great. For completeness, you omitted the vector-vector case for matmul '(k),(k)->()' - but the suggested new signature for `matmul` would cover that case as well, so not a problem. All the best, Marten ___ NumPy-Discussion mailing

[Numpy-discussion] numpy.pad -- problem?

2018-04-29 Thread Virgil Stokes
Here is a python code snippet: # python vers. 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] import numpy as np  # numpy vers. 1.14.3 #import matplotlib.pyplot as plt N   = 21 amp = 10 t   = np.linspace(0.0,N-1,N) arg = 2.0*np.pi/(N-1) y

Re: [Numpy-discussion] numpy.pad -- problem?

2018-04-29 Thread Andras Deak
> mean(y): -1.3778013372117948e-16 > ypad: > [-1.37780134e-16 -1.37780134e-16 -1.37780134e-16 0.e+00 > 3.09016994e+00 5.87785252e+00 8.09016994e+00 9.51056516e+00 > 1.e+01 9.51056516e+00 8.09016994e+00 5.87785252e+00 > 3.09016994e+00 1.22464680e-15 -3.09016994e+00 -5

Re: [Numpy-discussion] numpy.pad -- problem?

2018-04-29 Thread Andras Deak
PS. my exact numbers are different from yours (probably a multithreaded thing?), but `ypad[:-2].mean()` agrees with the last 3 elements in `ypad` in my case and I'm sure this is true for yours too. On Sun, Apr 29, 2018 at 11:36 PM, Andras Deak wrote: >> mean(y): -1.3778013372117948e-16 >> ypad:

Re: [Numpy-discussion] numpy.pad -- problem?

2018-04-29 Thread Eric Wieser
I would consider this a bug, and think we should fix this. On Sun, 29 Apr 2018 at 13:48 Virgil Stokes wrote: > Here is a python code snippet: > > # python vers. 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC > v.1900 64 bit (AMD64)] > import numpy as np # numpy vers. 1.14.3 > #import mat

Re: [Numpy-discussion] numpy.pad -- problem?

2018-04-29 Thread Andras Deak
On Sun, Apr 29, 2018 at 11:39 PM, Eric Wieser wrote: > I would consider this a bug, and think we should fix this. In that case `mode='median'` should probably fixed as well. ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.pyth