Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: afw
-
Labels:
-
Urgent?:No
Description
Obviously it's a dumb "just don't do that" kind of thing, but if you just
import lsst.afw.math as afwMath
|
sctrl = afwMath.StatisticsControl()
|
sctrl.setNumIter(0)
|
then you get a C++ assertion error, but things then propagate in a way that kills python/your kernel.
https://github.com/lsst/afw/tree/tickets/DM-29069
I'm not sure why but the branch isn't showing up on Jira. There are two possible ways (in two different commits) of fixing it - either by checking the input parameter at the pybind11 layer and throwing an exception, or doing that within the C++ layer. It makes sense to reserve `assert` in a method to assert the method performed as excepted, rather than asserting that it received inputs as expected. So I'm for dropping the commit that throws the exception from pybind11.