[Debichem-devel] Bug#1094717: Bug#1094717: rdkit: FTBFS with numpy 2.x
Norwid Behrnd
nbehrnd at yahoo.com
Thu Jan 30 13:35:03 GMT 2025
@Andrius On a tangent, somewhat prior to the release of NumPy 2.x.y, the
syntax to initialize numpy arrays and name the data type (`dtype`) in question
changed e.g.,
|------------+------------|
| old syntax | new syntax |
|------------+------------|
| np.float | float |
| np.int | int |
|------------+------------|
| np.obj | obj |
|------------+------------|
In consequence, a block like
``` python
###############################################################################
# CONSTANTS AND CONVERSION FACTORS
###############################################################################
b2a = 5.2917721092E-01 # Conversion factor: Bohr -> Angstrom
NA = 6.02214129E+23 # Avogadro number
x_axis = np.array([1.0, 0.0, 0.0], dtype=np.float) # x axis
y_axis = np.array([0.0, 1.0, 0.0], dtype=np.float) # y axis
z_axis = np.array([0.0, 0.0, 1.0], dtype=np.float) # z axis
```
no longer is valid contemporary NumPy. For a couple of times, this difference
once was _the_ reason why a legacy script (unrelated to RDKit) worked on one
isolated computer, but (no more) on a different computer connected to the web
(and hence routinely updated). Hence I speculate this might again contribute
here to the present obstacle ahead.
Best,
Norwid
More information about the Debichem-devel
mailing list