Sebastian Berg

Results 913 comments of Sebastian Berg

There is already a PR open for this, which you can see in the history here.

I'll note that `logaddexp` isn't good at being "reduced" in NumPy. SciPy has a `scipy.special.logsumexp` which should be used and already exists in `cupyx.scipy.special`! (I can see moving that into...

Good point, those `ptrdiff_t` casts made me think it probably doesn't matter, but the division/modulo happens _before_ that. FWIW, timing on a V100, it seems to make about a 20%...

@seiko2plus thanks a lot for this hard work! I don't want to discuss it on the PR here, but maybe you can send a very brief mail summarizing precision changes...

Just for reference, and maybe someone is interested in it. @jorenham used the text-signature path to work around this in NumPy: https://github.com/numpy/numpy/pull/30164 which seems at least an OK work-around for...

> Would it be appropriate to skip the new test on such platforms? If so, what is the best way of doing that? I don't know. Since this seems to...

I dunno either, but the main point of this function was probably never to give you a true minimum type but rather to say that `np.array([4.], dtype=float32) + 4e38` will...

> OK, I see that [intp](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.intp) has character code "n" and should work in a ufunc. Right, `n` is not available on NumPy 1.x though, so you'll just have to...

[Use `Py_ssize_t`](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.intp)? Otherwise, I guess define your own `ssize_t` as it is non-standard. Yes, you can use `ptrdiff_t` in practice and that was even correct on NumPy 1.x. But it...

To me, `divmod` seems like an odd one out that is probably not worth having.