Initializing error number in optimize zeros

Aug. 30, 2018
2:53 p.m.
Hi, I have a question about the scalar function root finders in optimize/Zeros like brentq, etc, that are written in C, the error number is never explicitly initialized, so it could be previously set to -2 or -1, which could be misinterpreted as a failure. Any reason not to set the error number to zero explicitly at the start of the function? I've created an issue to track this : ENH: initialize params->error_num to zero in optimize/Zeros/*.c · Issue #9189 · scipy/scipy https://github.com/scipy/scipy/issues/9189 and implemented it in the cython_optimize_struct branch of my fork, eg bisect.c: https://github.com/mikofski/scipy/blob/cython_optimize_struct/scipy/optimize... Please, any comment? Thanks! Mark
2402
Age (days ago)
2402
Last active (days ago)
0 comments
1 participants
participants (1)
-
Mark Alexander Mikofski