Re: [Numpy-discussion] Adding take_along_axis and put_along_axis functions

2018-05-28 Thread Stephan Hoyer
As I'm sure I stated in the GItHub discussion, I strongly support adding these functions to NumPy. This logic is non-trivial to get right and is quite broadly useful. These names also seem natural to me. On Mon, May 28, 2018 at 8:07 PM Eric Wieser wrote: > These functions provide a vectorized w

Re: [Numpy-discussion] matmul as a ufunc

2018-05-28 Thread Stephan Hoyer
On Mon, May 28, 2018 at 7:36 PM Eric Wieser wrote: > which ensure that it is still well defined (as the identity) on 1d arrays. > > This strikes me as a bad idea. There’s already enough confusion from > beginners that array_1d.T is a no-op. If we introduce a matrix-transpose, > it should either e

[Numpy-discussion] Adding take_along_axis and put_along_axis functions

2018-05-28 Thread Eric Wieser
These functions provide a vectorized way of using one array to look up items in another. In particular, they extend the 1d: a = np.array([4, 5, 6, 1, 2, 3]) b = np.array(["four", "five", "six", "one", "two", "three"]) i = a.argsort() b_sorted = b[i] To work for higher-dimensions: a = np.array([[

Re: [Numpy-discussion] matmul as a ufunc

2018-05-28 Thread Eric Wieser
which ensure that it is still well defined (as the identity) on 1d arrays. This strikes me as a bad idea. There’s already enough confusion from beginners that array_1d.T is a no-op. If we introduce a matrix-transpose, it should either error on <1d inputs with a useful message, or insert the extra

Re: [Numpy-discussion] matmul as a ufunc

2018-05-28 Thread Nathaniel Smith
On Mon, May 28, 2018 at 4:26 PM, Stephan Hoyer wrote: > On Mon, May 21, 2018 at 5:42 PM Matti Picus wrote: >> >> - create a wrapper that can convince the ufunc mechanism to call >> __array_ufunc__ even on functions that are not true ufuncs > > > I am somewhat opposed to this approach, because __a

Re: [Numpy-discussion] matmul as a ufunc

2018-05-28 Thread Stephan Hoyer
On Mon, May 21, 2018 at 5:42 PM Matti Picus wrote: > - create a wrapper that can convince the ufunc mechanism to call > __array_ufunc__ even on functions that are not true ufuncs > I am somewhat opposed to this approach, because __array_ufunc__ is about overloading ufuncs, and as soon as we rela

Re: [Numpy-discussion] [SciPy-User] Guidance required for automation of Excel work and Data Sciences

2018-05-28 Thread Benjamin Root
the openpyxl package will be your friend. Here is a whole chapter on using it: https://automatetheboringstuff.com/chapter12/ Welcome to python! Ben Root On Mon, May 28, 2018 at 12:21 AM, gaurav sinha wrote: > Dear Experts > Greetings!! > > *About me- I am Telecom professional having ~10 years o

Re: [Numpy-discussion] [SciPy-User] Guidance required for automation of Excel work and Data Sciences

2018-05-28 Thread Matthew Brett
Hi, On Mon, May 28, 2018 at 5:21 AM, gaurav sinha wrote: > Dear Experts > Greetings!! > > About me- I am Telecom professional having ~10 years of experience in > 2G/3G/4G mobile technologies. > > I have selected Python as my Programming Language. Its been some time, I > stared to learn and work

Re: [Numpy-discussion] Guidance required for automation of Excel work and Data Sciences

2018-05-28 Thread DIPO ELEGBEDE
Hi Gaurav, You may want to look at: www.python-excel.org This site lists out possible libraries you can use. Once you try out any of these and run into a snag, you can hit the group up again. HTH. Regards, Muhammed. On Sun, May 27, 2018, 23:22 gaurav sinha wrote: > Dear Experts > Greeting