Bug #1674
Possible bug introduced in Polygon in Python context
Status: | Resolved | Start date: | 24 Nov 2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | pospelov | % Done: | 0% | |
Category: | - | |||
Target version: | Sprint 33 |
Description
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
History
#1 Updated by pospelov about 4 years ago
Fixed in hotfix. Unit tests still have to be created.
#2 Updated by pospelov about 4 years ago
- Assignee set to pospelov
#3 Updated by pospelov about 4 years ago
- Status changed from Sprint to Resolved