This function is used in Python Scripting.

Description

Given a sequence of values, normalizes the values. Normalizing data refers to adjusting values measured on different scales and brings them into alignment to allow the comparison of corresponding normalized values. This creates uniformity of values by eliminating the different units of measurement, and to more easily compare data from different places

Returns an empty list if the sequence was empty or None.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.math.normalize(values)

  • Parameters

List[Float] values - A sequence of numerical values. Accepts both integers and floats. The sequence may not contain None type values.

  • Returns

List[Float] - A Java array (functionally similar to a Python list) of floats representing normalized input, with a mean of 0 and a standard deviation of 1. Returns an empty array if the input was empty or None. If the standard deviation is 0, will return an array of float NaN (Not a Number).

  • Scope

Gateway, Vision Client, Perspective Session

Code Example
Code Snippet
# Create a list of values.
values = [3.5, 5.6, 7.8, 7.4, 7.8]
   
# Return the most common values.
normalized = system.math.mode(values)
 
# Print the first item in the result.
print normalized[0]

# Iterate over the results.
for number in normalized:
    print number
Keywords

system math normalize, math.normalize