[Numpy-discussion] making np.gradient support unevenly spaced data

2017-01-10 Thread aleba...@gmail.com
Hi all, I have implemented a proposed enhancement for the np.gradient function that allows to compute the gradient on non uniform grids. (PR: https://github.com/numpy/numpy/pull/8446) The proposed implementation has a behaviour/signature is similar to that of Matlab/Octave. As argument it can take

[Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-17 Thread aleba...@gmail.com
Hi Nadav, I may be wrong, but I think that the result of the current implementation is actually the expected one. Using you example: probabilities for item 1, 2 and 3 are: 0.2, 0.4 and 0.4 P([1,2]) = P([2] | 1st=[1]) P([1]) + P([1] | 1st=[2]) P([2]) Now, P([1]) = 0.2 and P([2]) = 0.4. However: P

Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-17 Thread aleba...@gmail.com
2017-01-17 22:13 GMT+01:00 Nadav Har'El : > > On Tue, Jan 17, 2017 at 7:18 PM, aleba...@gmail.com > wrote: > >> Hi Nadav, >> >> I may be wrong, but I think that the result of the current implementation >> is actually the expected one. >> Using you

Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-18 Thread aleba...@gmail.com
2017-01-18 9:35 GMT+01:00 Nadav Har'El : > > On Wed, Jan 18, 2017 at 1:58 AM, aleba...@gmail.com > wrote: > >> >> >> 2017-01-17 22:13 GMT+01:00 Nadav Har'El : >> >>> >>> On Tue, Jan 17, 2017 at 7:18 PM, aleba...@gmail.com >>

Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-23 Thread aleba...@gmail.com
2017-01-23 15:33 GMT+01:00 Robert Kern : > On Mon, Jan 23, 2017 at 6:27 AM, Anne Archibald > wrote: > > > > On Wed, Jan 18, 2017 at 4:13 PM Nadav Har'El wrote: > >> > >> On Wed, Jan 18, 2017 at 4:30 PM, wrote: > >>> > Having more sampling schemes would be useful, but it's not possible > to