Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant code after numpy < 2.0 is deprecated #1211

Open
ricardoV94 opened this issue Feb 14, 2025 · 1 comment
Open

Remove redundant code after numpy < 2.0 is deprecated #1211

ricardoV94 opened this issue Feb 14, 2025 · 1 comment

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Feb 14, 2025

I've noticed that some of the code like this is redundant now. E.g. x * np.array(math.log(2.0)).astype(x.dtype) is now the same as x * math.log(2.0) because numpy now uses the type of x here. For backwards compatibility, maybe we should leave the astype conversion for now, but once numpy 1.26 support is dropped, this won't be needed.

Originally posted by @brendan-m-murphy in #1194 (comment)

@Armavica
Copy link
Member

Armavica commented Feb 17, 2025

Depends on:

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

No branches or pull requests

2 participants