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
3
Example 1
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)
3
Example 2
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)