numpy.pow

Here are the examples of the python api numpy.pow taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

Example 1

Project: PythonQwt Source File: transform.py
Function: transform
    def transform(self, value):
        """
        Transformation function

        :param float value: Value
        :return: Modified value
        
        .. seealso::
        
            :py:meth:`invTransform()`
        """
        if value < 0.:
            return -np.pow(-value, 1./self.__exponent)
        else:
            return np.pow(value, 1./self.__exponent)

Example 2

Project: PythonQwt Source File: transform.py
Function: inv_transform
    def invTransform(self, value):
        """
        Inverse transformation function

        :param float value: Value
        :return: Modified value
        
        .. seealso::
        
            :py:meth:`transform()`
        """
        if value < 0.:
            return -np.pow(-value, self.__exponent)
        else:
            return np.pow(value, self.__exponent)