Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ChakriCherukuri opened this issue Oct 13, 2023 · 0 comments
Open

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

ChakriCherukuri opened this issue Oct 13, 2023 · 0 comments

Comments

@ChakriCherukuri
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant