PythonCall.jl icon indicating copy to clipboard operation
PythonCall.jl copied to clipboard

Support NumPy 2.1 (only)

Open PallHaraldsson opened this issue 1 year ago • 2 comments

Going forward you likely want to support NumPy 2.0 (some breaking changes), and I think users can choose it already. 2.1 is out.

Since you support NumPy expliclity, do some of the changes concern you, such as:

np.float32(3) + 3. now returns a float32 when it previously returned a float64.

PallHaraldsson avatar Sep 05 '24 12:09 PallHaraldsson

Is there a specific issue here? Is PythonCall not compatible with numpy 2?

cjdoris avatar Sep 05 '24 19:09 cjdoris

It probably is like any other Python package is. It's just it seems you have special support for NumPy, so I'm not sure. Going forward, I assume most will want to use latest 2.x, and if you allow any NumPy, then it's inconsistent if you get Float32 back or Float64 with the older version, and Julia might be sensitive to that? [Also e.g. NumPy now has 64-bit integers on all platforms, including Windows, but had 32-bit integers before on 64-bit Windows.]

PallHaraldsson avatar Sep 05 '24 23:09 PallHaraldsson