I've made the DataSetIterator interface have getRank0Value and putRank0Value, which ensure that the units are handled properly (and efficiently at some point).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also a review of mutability is needed. See https://github.com/autoplot/dev/bugs/sf/2376/demoBugBundle2.jy
which shows how when dd has been marked immutable, it can still be modified by way of its mutable bundled dataset.
I've made the DataSetIterator interface have getRank0Value and putRank0Value, which ensure that the units are handled properly (and efficiently at some point).
PyQDataSet now checks to see if BUNDLE_1 has been set on the data, allowing this to work:
https://github.com/autoplot/dev/blob/master/bugs/sf/2376/demoSetItemUnits4.jy
See https://sourceforge.net/p/autoplot/bugs/2391/ which shows where the change made here slowed things down unacceptably.