Skip to content

Remove redundant code after numpy < 2.0 is deprecated #1211

Open
@ricardoV94

Description

@ricardoV94

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)

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