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

Fix Marker location validation for numpy array #1647

Merged

Conversation

Conengmo
Copy link
Member

@Conengmo Conengmo commented Nov 10, 2022

When passing a Numpy array as location for a Marker, currently an error is raised:

>       self.location = validate_location(location) if location else None
E       ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

That's because we use if location. Change it to if location is not None, which is more specific.

(Found this while working on #1343 )

@Conengmo Conengmo added the ready PR is ready for merging label Nov 10, 2022
@Conengmo Conengmo merged commit 35b2ca4 into python-visualization:main Nov 10, 2022
@Conengmo Conengmo deleted the fix-marker-location-validation branch November 10, 2022 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR is ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant