The ArrayDataSource is meant to represent a 1D data structure stored in an array. For some reason, when no data value has been set, the get_data() method returns a scalar 0.0 value.
It would probably make most sense for the value to be empty(shape=(0,)) (ie. a 1D array of length 0).
Changing this may break existing code which expects empty ArrayDataSources to return a scalar 0. On the flip side, this will potentially simplify the logic for get_bounds() and similar.
The
ArrayDataSourceis meant to represent a 1D data structure stored in an array. For some reason, when no data value has been set, theget_data()method returns a scalar0.0value.It would probably make most sense for the value to be
empty(shape=(0,))(ie. a 1D array of length 0).Changing this may break existing code which expects empty
ArrayDataSourcesto return a scalar 0. On the flip side, this will potentially simplify the logic forget_bounds()and similar.