INNER CODE UNIT · Python
scale
fury-gl/fury · fury/actor/core.py:67
def scale(self, scales):
"""
Scale the actor by the given scale factors.
Parameters
----------
scales : tuple or float
Scale factors along the x, y, and z axes. If a single float
is provided, uniform scaling is applied.
"""
if isinstance(scales, (int, float)):
scales = (scales, scales, scales)
elif not isinstance(scales, (list, tuple, np.ndarray)):
raise ValueError(
"Scale must be a sequence of three values or a single float."
)
scales = np.asarray(scales, dtype=np.float32)