8000 Error is thrown when a cell is selected in GridHeatmap · Issue #1632 · bqplot/bqplot · GitHub
[go: up one dir, main page]

Skip to content

Error is thrown when a cell is selected in GridHeatmap #1632

@ChakriCherukuri

Description

@ChakriCherukuri

Describe the bug
When selection is enabled (interactions={"click": "select"}) in the GridHeatmap and a cell is clicked below exception is thrown:

File ~/miniconda3/envs/mlviz/lib/python3.9/site-packages/bqplot/traits.py:177, in array_to_json(ar, obj, force_contiguous)
    175         return [array_to_json(np.array(row), obj, force_contiguous) for row in ar]
    176     else:
--> 177         raise ValueError("Unsupported dtype object")
    179 if ar.dtype.kind in ['S', 'U']:  # strings to as plain json
    180     return ar.tolist()

ValueError: Unsupported dtype object

To Reproduce
Code to reproduce the error:

fig = plt.figure(padding_y=0)

grid_map = plt.gridheatmap(
    np.random.rand(4, 4), 
    interactions={"click": "select"}
)
fig

When you click on any cell to select it, the above exception is thrown

Expected behavior
grid_map.selected should be updated with the [row_id, col_id]

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
bqplot >= 0.12.36
ipywidgets >= 7.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0