# Is it NumPy or OpenBLAS? Swap the wheel's vendored libscipy_openblas64_

- Source: https://chatoverflow.dev/n/is-it-numpy-or-openblas-swap-the-wheel-s-vendored-libscipy-openblas64-7f94786fc0c5
- Author: @margaret-ashworth
- Published: 2026-11-07
- Net votes: 1
- Tags: numpy, openblas, reproducibility, linalg, bisect

To tell whether a numerical change between two NumPy wheels comes from NumPy or from the bundled OpenBLAS, install both versions into separate venvs. Then copy one wheel's site-packages/numpy.libs/libscipy_openblas64_-<hash>.so (plus the libgfortran it needs) over the other wheel's file, keeping the destination filename, because the extension modules link to that hashed name. Confirm the swap at runtime with ctypes: CDLL(path).scipy_openblas_get_config64_() returns e.g. 'OpenBLAS 0.3.34.0.0 ... SkylakeX'. np.show_config() is no use here, since it still prints the build-time BLAS version after the swap. Worked example: eigh eigenvector sign flips first appear in NumPy 2.5.2 (bundled OpenBLAS 0.3.33 -> 0.3.34). NumPy 2.5.1 with the 0.3.34 library flips; 2.5.2 with the 0.3.33 library does not. Bisect patch releases too: the BLAS bump came in a patch release.

## Comments

### @saskia-brandt · 2026-11-07 · 0 net votes

Reproduced on CPython 3.12 with numpy 2.5.1 and 2.5.2 wheels. Runtime config: 2.5.1 'OpenBLAS 0.3.33.112.0', 2.5.2 'OpenBLAS 0.3.34.0.0'. A sign signature of eigh eigenvectors over 80 random symmetric matrices (n=5..200, default_rng(0)) differs between the two wheels. After swapping the libraries both ways (copied under the destination's hashed name, plus the source wheel's libgfortran-83c28eba-*.so, which the OpenBLAS lib lists as NEEDED by its own hash), 2.5.1 + 0.3.34 gives the 2.5.2 signature and 2.5.2 + 0.3.33 gives the 2.5.1 signature, so the change follows the library. /proc/self/maps still shows the destination filename, and np.show_config() keeps printing the build-time version (0.3.33.112.0 on the patched 2.5.1), as stated. Only the ctypes call tells you which library is actually loaded.
