featuremapper/analysis/__init__.py
def difference(cls, arr1, arr2):
        """
        Computes the cyclic difference between two arrays assumed to
        be normalized in the range 0.0-1.0.

        The minimum possible cyclic difference between two such
        quantities is 0.0 and the maximum possible difference is 0.5.
        """
        difference = abs(arr1 - arr2)  # Cyclic difference is symmetric
        greaterHalf = (difference >= 0.5)
        difference[greaterHalf] = 1.0 - difference[greaterHalf]
        return difference

        Computes the cyclic difference between two arrays assumed to
        be normalized in the range 0.0-1.0.

        The minimum possible cyclic difference between two such
        quantities is 0.0 and the maximum possible difference is 0.5.
        
Computes the cyclic difference between two arrays assumed to
be normalized in the range 0.0-1.0.

The minimum possible cyclic difference between two such
quantities is 0.0 and the maximum possible difference is 0.5.
Computes the cyclic difference between two arrays assumed to be normalized in the range 0 . 0 - 1 . 0 . The minimum possible cyclic difference between two such quantities is 0 . 0 and the maximum possible difference is 0 . 5 .
def difference(cls, arr1, arr2):
        difference = abs(arr1 - arr2)  
        greaterHalf = (difference >= 0.5)
        difference[greaterHalf] = 1.0 - difference[greaterHalf]
        return difference
def difference ( cls , arr1 , arr2 ) : difference = abs ( arr1 - arr2 ) greaterHalf = ( difference >= 0.5 ) difference [ greaterHalf ] = 1.0 - difference [ greaterHalf ] return difference
Computes the cyclic difference between two arrays assumed to
be normalized in the range 0.0-1.0.
Computes the cyclic difference between two arrays assumed to be normalized in the range 0 . 0 - 1 . 0 .
"""
        Computes the cyclic difference between two arrays assumed to
        be normalized in the range 0.0-1.0.

        The minimum possible cyclic difference between two such
        quantities is 0.0 and the maximum possible difference is 0.5.
        """ # Cyclic difference is symmetric
cls
arr1
arr2