Warren Weckesser

Results 224 comments of Warren Weckesser

This is the second issue in the list of issues when the "oldest" option is selected. Perhaps with some concrete proposals, we can start working on closing it. Some options:...

Digging down into the implementation, we end up here: https://github.com/numpy/numpy/blob/50997e3c3b1f9331d3b03e3867c4896422278e52/numpy/_core/src/multiarray/convert_datatype.c#L1329-L1351 The thresholds used in those tests are only approximations to the actual lower and upper bounds of the types. I...

@steppi, are you working on this currently? I can work on it, but I won't bother if you (or someone else) already have a fix in progress.

I think `int` will result in the same problem. My understanding is that even on 64 bit Windows, `int` is still 32 bit, but the default NumPy integer type (i.e....

> I thought because this was only reported for eval_hermite that the issue only occured when the input type is long. Update: Of the functions tested in the `test_cython_api` in...

@seberg, is there a C type that we can be sure is equivalent to `npy_intp`? Maybe `ptrdiff_t`?

> @seberg, is there a C type that we can be sure is equivalent to npy_intp? Maybe ptrdiff_t? Cython reproduces the type `Py_ssize_t` from the Python API, so that should...

It turns out that for the purpose of fixing this issue in https://github.com/scipy/scipy/pull/21401, I was able to use `Py_ssize_t` everywhere I needed an integer that was compatible with `npy_intp`. It...

Thanks @dphipps-qnx. We can do more clean-up: this file will *always* be compiled with C++, so we can drop the `#ifdef __cplusplus / #endif` conditional wrappers and unconditionally use `extern...