[Numpy-discussion] Re: Managing integer overflow

2023-05-02 Thread jmsachs
> I think this example shows that you don't need any special infrastructure > from numpy. I don't think there is going to be much appetite to expand our > API in this direction. But I do! I'm looking for something that implements the multiply_check_ov(X,Y) and similar functionality for addition a

[Numpy-discussion] Re: Managing integer overflow

2023-04-27 Thread jmsachs
> Ideally if there is an overflow in an array operation I'd like to produce an > "overflow array" that's the same size as the result array, but with the > values +1 if it's a positive overflow or -1 if it's a negative overflow. Alternatively, if boolean arrays are a much more compact memory foot

[Numpy-discussion] Managing integer overflow

2023-04-26 Thread jmsachs
Hi there! I'm looking at options for fixed-point math, and none of the existing Python modules (https://github.com/smlgit/fpbinary, https://github.com/francof2a/fxpmath, etc.) seem to check the right boxes, so I'm thinking about creating my own, and maybe contributing it to numpy. Are there any