Skip to content

ArrayDataSource get_data() returns scalar 0.0 when _data is None #255

@corranwebster

Description

@corranwebster

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions