Skip to content

Conversation

@yzewei
Copy link
Contributor

@yzewei yzewei commented Jan 26, 2026

Box64 failed to translate the fenv exception mask on non-x86 hosts, causing feraiseexcept/fetestexcept to malfunction, and NumPy to fail to trigger LinAlgError.

like:

test.py
import numpy as np
from numpy.linalg import inv

def cb(err, flag):
    print("errstate callback:", err, flag)

np.seterrcall(cb)
np.seterr(all='call')

a = np.array([[1.,0.],[0.,0.]])
print(inv(a))

The expected callback was to be triggered and a LinAlgError to be thrown, but this did not occur before the modification.

Signed-off-by: Zewei Yang <yangzewei@loongson.cn>
@ptitSeb ptitSeb merged commit a288925 into ptitSeb:main Jan 26, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants