Possible bug introduced in Polygon in Python context
|Status:||Resolved||Start date:||24 Nov 2016|
|Target version:||Sprint 33|
Earlier version of Polygon had copying of input arrays instead of const reference.
This was because of crash if one use it from Python like that:
simulation.addMask(ba.Polygon([[0.0*deg, 1.0*deg], [0.5*deg, 1.2*deg],[0.5*deg, 0.8*deg]]), True)
Copying of array was a solution to the problem. This was commented in implementation file as:
// IMPORTANT Input parameter is not "const reference" to be able to work from python // (auto convertion of python list to vector<vector<double>>).
So I believe is that the bug is back again.Within this item
- Create a python unit test
- return all Polygon constructors back to copying
- Revise all vector usage in BornAgain in the context of PythonAPI
e.g. Histogram2D() constructors