Axis objects do not at all work well with unequal grids
Ablinne opened this issue · comments
>>> import postpic as pp
>>> a = pp.Axis()
>>> a.grid = [1,3,8]
>>> print(a.grid)
array([ 1. , 3.75, 8. ])
Clearly, the natural thing to expect is, that a.grid
returns the same numbers as supplied to its setter.
After some discussion, the best way to deal with this, seems to be to implement Axis in such a way that it can store either grid
(and extent
), grid_node
or even both and will only calculate the missing parts. This will enable more flexibility and correct behaviour in both, point and cell-based data.