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.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Labels | SciencePipelines |
Assignee | Arun Kannawadi [ kannawad ] |
Watchers | Jim Bosch, Merlin Fisher-Levine [ Jim Bosch, Merlin Fisher-Levine ] | Jim Bosch, Merlin Fisher-Levine, Morgan Schmitz [ Jim Bosch, Merlin Fisher-Levine, Morgan Schmitz ] |
Status | To Do [ 10001 ] | In Progress [ 3 ] |
Labels | SciencePipelines | PairCoding SciencePipelines |
Reviewers | Morgan Schmitz [ mschmitz ] | |
Status | In Progress [ 3 ] | In Review [ 10004 ] |
Status | In Review [ 10004 ] | Reviewed [ 10101 ] |
Resolution | Done [ 10000 ] | |
Status | Reviewed [ 10101 ] | Done [ 10002 ] |
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.