Skip to content

numpy 2.3.0 madness #556

@xiki-tempula

Description

@xiki-tempula

It seems that numpy 2.3.0 gives widely different results for different python versions.
Here is the test code

u_nk.npy.zip

import numpy as np
import pymbar

u_nk = np.load('u_nk.npy')
mbar = pymbar.MBAR(
            u_nk,
            [4001]*5,
        )
out = mbar.compute_entropy_and_enthalpy()
print(out['Delta_f'][0,:])

Mac OS python 3.11 with numpy 2.2.6 gives
[0. 1.61906927 2.55799023 2.98630159 3.0411557 ]
Mac OS python 3.12 with numpy 2.2.6 gives
[0. 1.61906927 2.55799023 2.98630159 3.0411557 ]
The result is identical.

Mac OS python 3.11 with numpy 2.3.0 gives
[0. 1.61712842 2.55818601 2.98991384 3.04777187]
Mac OS python 3.12 with numpy 2.3.0 gives
[0. 1.61774589 2.55915648 2.99099155 3.04888306]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions