pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Remove redundant code after numpy < 2.0 is deprecated

Open ricardoV94 opened this issue 10 months ago • 1 comments

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 https://github.com/pymc-devs/pytensor/pull/1194#discussion_r1954233758

ricardoV94 avatar Feb 14 '25 18:02 ricardoV94

Depends on:

  • #1216

Armavica avatar Feb 17 '25 17:02 Armavica