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

Add custom validator for JupyterScatter.points and JupyterScatter.selection #14

Open
manzt opened this issue Jun 29, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@manzt
Copy link
Collaborator

manzt commented Jun 29, 2021

After #11, we use traittypes.Array to annotate JupyterScatter.points and JupyterScatter.selection.

However, traittypes.Array is valid for any numpy array and the shape/dtype for points and selection are more strict. We should add custom validators for these attributes, which will raise an exception if an array of the wrong shape/dtype is assigned on the python side.

This isn't urgent, since jscatter.Scatter for the most part ensures the data are correct, but this would probably help with tracking down weird bugs of where dtypes aren't what are expected.

@flekschas flekschas added the enhancement New feature or request label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
2 participants