InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
Wrong parameter to ExhaustiveOptimizerv4.SetNumberOfSteps crashes Python kernel
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
### Description
This hangs a Jupyter Lab notebook and crashes IPython.
```
import itk
import numpy as np
import matplotlib.pyplot as plt
OptimizerType = itk.ExhaustiveOptimizerv4[itk.D]
optimizer = OptimizerType.New()
#optimizer.SetNumberOfSteps([5, 0]) # correct
optimizer.SetNumberOfSteps(5) # incorrect
```
### Expected behavior
A soft type-error that doesn't crash the kernel.
### Actual behavior
It hard crashes.
### Versions
ITK release branch, Python Wrapping.
### Environment
ipython 7.13.0
jupyter-lab 1.2.7
Python 3.7.6
ITK release branch built locally and referenced using WrapITK.pth
### Additional Information
Contributor guide
Assessment
This issue has not been assessed yet.