Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy normalize

def normalize(v):
    norm = np.linalg.norm(v)
    if norm == 0: 
       return v
    return v / norm
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #normalize
ADD COMMENT
Topic
Name
5+5 =