﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
16848	Update from numpy 1 to numpy 2.	Tom Goddard	Tom Goddard	"This ticket is to track whatever we find about incompatibilities between numpy 1 and numpy 2.

Fortunately all the C++ level numpy API use is I think in one place in the ""arrays"" bundle.  Actually we should check if other parts of the C++ code directly use the numpy API.  Then there is the separate issue of breaking numpy changes at the Python level.  I remember reading the long numpy 2 changes document and being slightly scared.  For instance numpy 2 changed the default casting of arrays in subtle ways like (numpy-float32-array) + 1.0 is a float64 array in numpy 1 but is a float32 array in numpy 2.  Some of our C++ code only handles float32 or only float64 so this can lead to errors.

A very basic issue with numpy 1 vs numpy 2 that I wish I understood is how can you expect every single package you use that depends on numpy to use a single version (1 or 2)?  Many PyPi packages pin the major version of numpy.  So with an app like ChimeraX that imports dozens of numpy dependent PyPi packages and others that are pulled in by extensions (e.g. pyKVFinder) how can you possibly hope to avoid one package requiring numpy 1 and another requiring numpy 2?  Since there have been 20 years of Python modules relying on numpy 1, it is hard to imagine any but the simplest numpy applications being able to use numpy 2 because all those legacy numpy 1 packages won't be updated to numpy 2.  I must be missing something."	enhancement	assigned	moderate		Core				chimerax-programmers				all	ChimeraX
