You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the python bindings for certain Zinc APIs which generally return a list of values, there is a special case where a scalar is returned if there is one value.
This is irritating, as it requires turning the scalar into a list to work with the same client code.
Particularly bad example:
Element.getScaleFactors() which returns a list if there are 0 or >1 values, but a scalar if there is 1.
All python APIs which can return a list should return a list, even if one element in it.
The text was updated successfully, but these errors were encountered:
In the python bindings for certain Zinc APIs which generally return a list of values, there is a special case where a scalar is returned if there is one value.
This is irritating, as it requires turning the scalar into a list to work with the same client code.
Particularly bad example:
Element.getScaleFactors() which returns a list if there are 0 or >1 values, but a scalar if there is 1.
All python APIs which can return a list should return a list, even if one element in it.
The text was updated successfully, but these errors were encountered: