What did you do this week?
Last week I got stuck at some failures on Linux Python3.7-dbg (debug builds). I was able to replicate it locally and thankfully also found a fix for it. Turns out, I was accessing a Python attribute while a live exception was set in Python. This is not allowed because the Python objects of the class might have been destroyed or garbage collected and my attribute lookup might fail with a segmentation fault. This was caught by the debug build of Python 3.7 and was fairly simple to fix: just removed the offending line and the tests passed again! To ensure this doesn't happen again, I refactored some code to make more careful use of PyErr_Occurred()
.
There was also some discussion around what to name the seed parameter: the new Generator API favors something other than random_state
which has been well-established in SciPy. As there was no consensus among what to name it - some favored consistency while others wanted to differ between the new and the old API - we decided to go with the plain old random_state
and change its name in some other PR at all places in SciPy.