pymel.util.arrays.normal

static arrays.normal(a, axis=None)

normal(a[, axis=(axis0, axis1, ...)]) –> Array

Returns a normalized copy of self: self/length(self, axis).

>>> A = Array([[0.5,0.5,-0.707],[0.707,-0.707,0.0]])
>>> print A.formated()
[[0.5, 0.5, -0.707],
 [0.707, -0.707, 0.0]]
>>> print normal(A).formated()
[[0.353593437318, 0.353593437318, -0.499981120367],
 [0.499981120367, -0.499981120367, 0.0]]
>>> print normal(A, axis=(0,1)).formated()
[[0.353593437318, 0.353593437318, -0.499981120367],
 [0.499981120367, -0.499981120367, 0.0]]
>>> print normal(A, axis=0).formated()
[[0.5, 0.5, -0.707],
 [0.707, -0.707, 0.0]]
>>> print normal(A, axis=1).formated()
[[0.577408397894, 0.577408397894, -1.0],
 [0.816455474623, -0.816455474623, 0.0]]

Previous topic

pymel.util.arrays.modf

Next topic

pymel.util.arrays.outer

Core

Core Modules

Other Modules

This Page