def scale_transform(t, scale):
if isinstance(scale, float) or isinstance(scale, int):<EOL><INDENT>scale = [scale, scale, scale]<EOL><DEDENT>if _is_indexable(t[<NUM_LIT:0>]):<EOL><INDENT>return [[t[<NUM_LIT:0>][<NUM_LIT:0>] * scale[<NUM_LIT:0>], t[<NUM_LIT:0>][<NUM_LIT:1>] * scale[<NUM_LIT:1>], t[<NUM_LIT:0>][<NUM_LIT:2>] * scale[<NUM_LIT:2>]],<EOL>t[<NUM_LIT:1>]]<EOL><DEDENT>else:<EOL><INDENT>return [t[<NUM_LIT:0>] * scale[<NUM_LIT:0>], t[<NUM_LIT:1>] * scale[<NUM_LIT:1>], t[<NUM_LIT:2>] * scale[<NUM_LIT:2>]]<EOL><DEDENT>
Apply a scale to a transform
:param t: The transform [[x, y, z], [x, y, z, w]] to be scaled OR the position [x, y, z] to be scaled
:param scale: the scale of type float OR the scale [scale_x, scale_y, scale_z]
:return: The scaled