Re: [Numpy-discussion] Proposal to accept NEP-18, __array_function__ protocol

2018-09-26 Thread Joris Van den Bossche
Hi all, I have small question for clarification regarding some reducing numpy functions like np.sum, np.mean, etc, i.e. functions that now work on other array-like objects by checking if they have 'sum', 'mean', etc method and if so, "dispatch" to the method. Those functions are several times ment

[Numpy-discussion] Releasing the GIL in ufuncs dealing with object arrays

2019-08-19 Thread Joris Van den Bossche
Hi all, PyGEOS (https://github.com/caspervdw/pygeos) is an experimental package implementing a set of numpy ufuncs to provide vectorized geometry functionality (wrapping the C++ GEOS library). The way it does this is by implementing a Python extension type (pygeos.Geometry) that wraps an actual G

Re: [Numpy-discussion] Releasing the GIL in ufuncs dealing with object arrays

2019-08-20 Thread Joris Van den Bossche
Hi Sebastian, Thanks for the answer! On Mon, 19 Aug 2019 at 17:57, Sebastian Berg wrote: > ... > > Hmmm, interesting use case. No, I do not think there currently is a > reasonable way to do this (I think there may be ways to hack it). Even > when all access to the objects is safe by itself, you