Skip to content

Fix error when selecting GridHeatMap cells (#1632) - #1710

Open
ChakriCherukuri wants to merge 1 commit into
bqplot:masterfrom
ChakriCherukuri:fix-gridheatmap-selected-dtype
Open

ChakriCherukuri wants to merge 1 commit into
bqplot:masterfrom
ChakriCherukuri:fix-gridheatmap-selected-dtype

Conversation

@ChakriCherukuri

Copy link
Copy Markdown
Member

Selecting a cell passed [[row, col]] through as an object array, which then failed to serialize back to the frontend. Keep rectangular numeric selections as real numeric arrays so they round-trip. Added tests.

References

Fixes #1632.

Code changes

Selecting a cell in a GridHeatMap sets selected to a rectangular list of
[row, col] pairs (e.g. [[0, 1]]). array_from_json forced dtype=object for any
list-of-lists, producing an object array that array_to_json then refused to
re-serialize when ipywidgets echoed the trait back — raising ValueError: Unsupported dtype object.

User-facing changes

GridHeatMap cell selection no longer throws errors; selected attribute works correctly.

Backwards-incompatible changes

None

Selecting a cell passed [[row, col]] through as an object array, which then
failed to serialize back to the frontend. Keep rectangular numeric selections
as real numeric arrays so they round-trip. Added tests.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Error is thrown when a cell is selected in GridHeatmap

1 participant