Albert Steppi
Albert Steppi
> It was in the proposal to document best practices for testing special functions. We didn't commit to delivering `mparray` and a full framework as part of the grant, but...
I've created a spreadsheet for every function that I think is in scope for the C++ translations. I was going to create a tracking issue for everything, but have decided...
> May I ask for more details about the bullet point “root finding primitives”? Sure. What I had in mind was basically just to re-implement the solver from [cdlib](https://github.com/scipy/scipy/blob/66ec33370c889e9c9acba320354b624ee258ee22/scipy/special/cdflib.c#L5722) in...
> * I'm unsure about license stuff. Original code appears to be BSD 2-clause, so it should be no problem, but I am not sure if I edited the license...
Part of the cause is that we're currently using [type punning](https://en.wikipedia.org/wiki/Type_punning) to convert back and forth between `std::complex` and `npy_cdouble` to avoid copying, and this is technically undefined behavior. https://github.com/scipy/scipy/blob/485b26da6b797b5b98d9441ae304388ea1dceb66/scipy/special/special_wrappers.cpp#L109-L123...
Thanks @eli-schwartz. I didn't look carefully enough. I've reproduced this locally on linux and am reopening now. Somehow there seems to be a mix-up between the old struct numpy complex...
OK, so I've found that in NumPy 2.0, when something is being compiled as C++, an `npy_cdouble` is a struct https://github.com/numpy/numpy/blob/128d1ae431b0d6dc20851baa1b5829583d8727b0/numpy/_core/include/numpy/npy_common.h#L361C1-L367C1 and when it is being compiled as C, it...
> > We could maybe use std::complex, but doing that opens yet another can of worms. > > Mind expanding on what is this can of worms? For one, I...
> CC @steppi @izaid, not sure if this is on your radar, but looks like it'd be closely related to recent C++ efforts in scipy.special. Reading through the above, things...
@tupui, I don't think @rkern has been communicating in bad faith and his feedback should be welcome. He has a high level of relevant expertise, and even not accounting for...