Ticket #7371 (closed: fixed)
Expose boolean table cell to python
Reported by: | Owen Arnold | Owned by: | Owen Arnold |
---|---|---|---|
Priority: | major | Milestone: | Release 2.6 |
Component: | Python | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Martyn Gigg |
Description (last modified by Nick Draper) (diff)
At the moment, fetching the value of a cell containing a boolean type will result in a error complaining that the c++ type cannot be converted to a bool.
This issue was identified as part of the testing for #7325.
Currently, running this:
ws = CreateEmptyTableWorkspace() ws.addColumn('bool', 'a') ws.addRow([True]) ws.addRow([False]) print ws.cell(0, 0) # Expect True back print ws.cell(1, 0) # Expect False back
Gives this:
ValueError: Cannot convert Python type to C++: bool at line 3 in
Change History
comment:3 Changed 7 years ago by Owen Arnold
refs #7371. Fix cell setting and fetching and test.
Changeset: 02ab6b3719518971415140872950167f61c8209d
comment:4 Changed 7 years ago by Owen Arnold
- Status changed from accepted to verify
- Resolution set to fixed
Tester: Run the script in the description. It should fail on an older version of mantid without these changes. Then run the script with these changes applied. Should print True and then False on separate lines.
comment:5 Changed 7 years ago by Owen Arnold
refs #7371. OSX issue, wrong list size declared.
Changeset: f25b952ce0974d2a476af32efb6888accfe8fc4d
comment:6 Changed 7 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:7 Changed 7 years ago by Martyn Gigg
- Status changed from verifying to closed
Looks fine now.