[Numpy-discussion] Re: Tricky ufunc implementation question

2025-07-03 Thread Bill Ross
Do the JVM-based pythons solve any threading issues? Plain parallel java seems indispensable. Bill -- Phobrain.com On 2025-07-03 05:05, Nathan via NumPy-Discussion wrote: > If a NumPy array is shared between two threads, NumPy doesn't do anything to > synchronize array access. This is true

[Numpy-discussion] Re: Tricky ufunc implementation question

2025-07-03 Thread Nathan via NumPy-Discussion
If a NumPy array is shared between two threads, NumPy doesn’t do anything to synchronize array access. This is true in all Python versions and build configurations - since NumPy releases the GIL during most array operations whether or not you’re using free-threaded Python doesn’t change much except

[Numpy-discussion] Re: Tricky ufunc implementation question

2025-07-03 Thread Benjamin Root via NumPy-Discussion
On a related note, does numpy's gufunc mechanism provide any thread safety, or is the responsibility on the extension writer to do that? For simple numpy array inputs, I would think that I don't have to worry about free-threaded python messing things up (unless I have a global state), I'm wondering