Ticket #5777 (closed: fixed)
IntArrayProperty in new Python API doesn't accept ranges
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Release 2.3 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Andrei Savici |
Description
In the old API you could do
self.declareListProperty("Input", int)
and the set the property using a range
alg.setProperty("Input", "10:15")
which would yield the 6 numbers from 10->15. Trying the same on the new API with an IntArrayProperty throws an error saying it can't convert "10:15" to an int list
Change History
comment:2 Changed 8 years ago by Martyn Gigg
Allow Python ArrayProperty to deal with ranges. Refs #5777
The Python property is actually a vector<long> so an extra template instantiation was required for the toValue function.
Changeset: ca8d42e63e8333cc4485fc4e5895cb0cf6f5b6c1
comment:3 Changed 8 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
comment:4 Changed 8 years ago by Martyn Gigg
Allow Python ArrayProperty to deal with ranges. Refs #5777
The Python property is actually a vector<long> so an extra template instantiation was required for the toValue function.
Changeset: ca8d42e63e8333cc4485fc4e5895cb0cf6f5b6c1
comment:5 Changed 8 years ago by Andrei Savici
- Status changed from verify to verifying
- Tester set to Andrei Savici