glotzerlab / plato

Efficient visualization of particle data supporting several rendering engines.
https://plato-draw.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
12 stars 4 forks source link

Annoying FutureWarning #6

Closed bdice closed 6 years ago

bdice commented 6 years ago

Original report by me.


/home/bdice/code/plato/plato/draw/Scene.py:60: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if 'name' in config:

This warning appears a lot when I use plato. This seems like the warning that numpy throws when comparing arrays. Maybe config is an array and this is checking to see if 'name' is in any of its elements? :man_shrugging:

bdice commented 6 years ago

Original comment by Matthew Spellings (Bitbucket: mspells, GitHub: klarh).


Explicitly check type of feature configs for dictionaries in Scene

Previously we were relying on things to throw an error when indexed or checking when a string is contained within the given value, but that causes numpy arrays, for example, to emit warnings.

Fixes #6