[Numpy-discussion] Re: Policy on AI-generated code

2024-07-04 Thread Daniele Nicolodi
On 04/07/24 13:29, Matthew Brett wrote: I agree it is hard to enforce, but it seems to me it would be a reasonable defensive move to say - for now - that authors will need to take full responsibility for copyright, and that, as of now, AI-generated code cannot meet that standard, so we require au

[Numpy-discussion] Re: Policy on AI-generated code

2024-07-04 Thread Daniele Nicolodi
On 04/07/24 12:49, Matthew Brett wrote: Hi, Sorry to top-post! But - I wanted to bring the discussion back to licensing. I have great sympathy for the ecological and code-quality concerns, but licensing is a separate question, and, it seems to me, an urgent question. The licensing issue is c

[Numpy-discussion] Re: Policy on AI-generated code

2024-07-04 Thread Daniele Nicolodi
On 03/07/24 23:40, Matthew Brett wrote: Hi, We recently got a set of well-labeled PRs containing (reviewed) AI-generated code: https://github.com/numpy/numpy/pull/26827 https://github.com/numpy/numpy/pull/26828 https://github.com/numpy/numpy/pull/26829 https://github.com/numpy/numpy/pull/26830

[Numpy-discussion] Re: spam on the mailing lists

2021-10-10 Thread Daniele Nicolodi
On 10/10/2021 18:37, Hameer Abbasi wrote: > Hello everyone, > > Just my 2 cents: I marked a few of the actual spam e-mails on this > and the SciPy-user list as spam on my client, and it seems many > random e-mails get sent to spam now, from both the NumPy and SciPy lists. You should complain abo

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

2021-05-30 Thread Daniele Nicolodi
On 30/05/2021 00:48, Robert Kern wrote: > On Sat, May 29, 2021 at 3:35 PM Daniele Nicolodi <mailto:dani...@grinta.net>> wrote: > > What does k stand for here? As someone that never encountered this > function before I find both names equally confusing. If I unde

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

2021-05-29 Thread Daniele Nicolodi
On 29/05/2021 18:33, David Menéndez Hurtado wrote: > > > 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 wid

Re: [Numpy-discussion] NumPy Feature Request: Function to wrap angles to range [ 0, 2*pi] or [ -pi, pi ]

2020-11-24 Thread Daniele Nicolodi
On 24/11/2020 10:25, Thomas wrote: > Like Nathaniel said, it would not improve much when compared to the > modulo operator.  > > It could handle the edge cases better, but really the biggest benefit > would be that it is more convenient. Which edge cases? Better how? > And as the "unwrap" functi

Re: [Numpy-discussion] NumPy Feature Request: Function to wrap angles to range [ 0, 2*pi] or [ -pi, pi ]

2020-11-24 Thread Daniele Nicolodi
On 24/11/2020 02:49, Nathaniel Smith wrote: > How would this proposed function compare to using the modulo operator, > like 'arr % (2*pi)'? I wrote almost the same word bu word reply, before realizing that taking the modulo looses the sign. The correct operation is slightly more complex (untested)

Re: [Numpy-discussion] Proposal: add the timestamp64 type (Noam Yorav-Raphael)

2020-11-12 Thread Daniele Nicolodi
On 12/11/2020 17:40, Matti Picus wrote: > In a one-on-one discussion with Noam in a pre-community call (that, how > ironically, we had time for since we both messed up the meeting > time-zone change) we reached the conclusion that the request is to > clarify whether NumPy's datetime64 represents

Re: [Numpy-discussion] setuptools/distutils merger & numpy.distutils

2020-09-06 Thread Daniele Nicolodi
On 06/09/2020 11:28, Ralf Gommers wrote: > On Sun, Sep 6, 2020 at 9:50 AM Daniele Nicolodi > This may be bigger endeavor, but wouldn't it be possible to extend > setuptools interfaces in a way that plugging in the fortran support does > not require monkey patching

Re: [Numpy-discussion] setuptools/distutils merger & numpy.distutils

2020-09-06 Thread Daniele Nicolodi
On 06/09/2020 07:06, David Cournapeau wrote: > Assuming the numpy.distutils codebase has not changed much in the last > 10 years, my sense is that a lot of the features that relied on monkey > patching can be merged upstream,  fortran support being one notable > exception. This may be bigger endea

Re: [Numpy-discussion] An alternative to vectorize that lets you access the array?

2020-07-15 Thread Daniele Nicolodi
On 12/07/2020 07:00, Ram Rachum wrote: > The reason I want the second version is that I can then have sounddevice > start playing `output_array` in a separate thread, while it's being > calculated. (Yes, I know about the GIL, I believe that sounddevice > releases it.) I don't think this is a sound

Re: [Numpy-discussion] Proposal to add clause to license prohibiting use by oil and gas extraction companies

2020-07-01 Thread Daniele Nicolodi
On 01-07-2020 12:34, John Preston wrote: > Hello all, > > The following proposal was originally issue #16722 on GitHub but at > the request of Matti Picus I am moving the discussion to this list. [snip] Hello John, I don't have copyright on any of the Numpy code, however would like to express a

Re: [Numpy-discussion] NEP 38 - Universal SIMD intrinsics

2020-02-04 Thread Daniele Nicolodi
On 04-02-2020 08:08, Matti Picus wrote: > Together with Sayed Adel (cc) and Ralf, I am pleased to put the draft > version of NEP 38 [0] up for discussion. As per NEP 0, this is the next > step in the community accepting the approach layed out in the NEP. The > NEP PR [1] has already garnered a fair

Re: [Numpy-discussion] argmax() indexes to value

2019-11-01 Thread Daniele Nicolodi
On 01-11-2019 09:51, Allan Haldane wrote: > my thought was to try `take` or `take_along_axis`: > >ind = np.argmin(a, axis=1) >np.take_along_axis(a, ind[:,None], axis=1) > > But those functions tend to simply fall back to fancy indexing, and are > pretty slow. On my system plain fancy inde

Re: [Numpy-discussion] argmax() indexes to value

2019-11-01 Thread Daniele Nicolodi
t is disappointing to have very precise questions dismissed as "that is complicated, thus you don't really want to do it". Best, Dan > On Thu, Oct 31, 2019 at 12:35 AM Daniele Nicolodi <mailto:dani...@grinta.net>> wrote: > > On 30/10/2019 22:42, Elliot Hallmark

Re: [Numpy-discussion] argmax() indexes to value

2019-10-30 Thread Daniele Nicolodi
penalty compared to running np.argmax() and then indexing. Cheers, Dan > > -elliot > > On Wed, Oct 30, 2019, 10:32 PM Daniele Nicolodi <mailto:dani...@grinta.net>> wrote: > > On 30/10/2019 19:10, Neal Becker wrote: > > max(axis=1)? > > Hi Ne

Re: [Numpy-discussion] argmax() indexes to value

2019-10-30 Thread Daniele Nicolodi
s of the array. I would like to avoid to have to iterate the array more than once. Thank you! Cheers, Dan > On Wed, Oct 30, 2019, 7:33 PM Daniele Nicolodi <mailto:dani...@grinta.net>> wrote: > > Hello, > > this is a very basic question, but I cannot find a satisf

[Numpy-discussion] argmax() indexes to value

2019-10-30 Thread Daniele Nicolodi
Hello, this is a very basic question, but I cannot find a satisfying answer. Assume a is a 2D array and that I get the index of the maximum value along the second dimension: i = a.argmax(axis=1) Is there a better way to get the value of the maximum array entries along the second axis other than:

Re: [Numpy-discussion] [SciPy-User] Why slicing Pandas column and then subtract gives NaN?

2019-02-15 Thread Daniele Nicolodi
On 15-02-2019 14:48, C W wrote: > Fair enough. Python has been called the #1 language for data science. If > I'm slicing a[2:5] out of range, why not throw an error. This is> > disappointing! No one here is trying to convince you to use Python. If you don't like it, don't use it. Complain in this

Re: [Numpy-discussion] Github down on comcast

2018-06-29 Thread Daniele Nicolodi
On 6/29/18 11:15 AM, Charles R Harris wrote: > Hi All, > > Just a note for those who may be having a problem reaching Github, it is > currently down for comcast users. > See http://downdetector.com/status/github/map/. Funny enough http://dowdetector.com seems to not be reachable from this side of

[Numpy-discussion] Is there a better way to write a stacked matrix multiplication

2017-10-26 Thread Daniele Nicolodi
Hello, is there a better way to write the dot product between a stack of matrices? In my case I need to compute y = A.T @ inv(B) @ A with A a 3x1 matrix and B a 3x3 matrix, N times, with N in the few hundred thousands range. I thus "vectorize" the thing using stack of matrices, so that A is a

Re: [Numpy-discussion] Compare NumPy arrays with threshold and return the differences

2017-05-17 Thread Daniele Nicolodi
On 5/17/17 10:50 AM, Nissim Derdiger wrote: > Hi, > In my script, I need to compare big NumPy arrays (2D or 3D), and return > a list of all cells with difference bigger than a defined threshold. > The compare itself can be done easily done with "allclose" function, > like that: > Threshold = 0.1 >