Field Calculator Null Values

Discussion created by ojbarrera on Aug 7, 2013
Latest reply on Aug 7, 2013 by ojbarrera

I am trying to calculate the incomplete gamma function using Python. For now, the only way that I have found to do this is by using the library "mpmath". Particularly, the "mpmath.gammainc" function works perfectly in the Python window but when I try to implement this function in the field calculator it gives "Null" values.

This is the code I am using:

def H(a):
import mpmath
return b

Is there any solution for solving this problem? Is there any alternative method for calculating the incomplete gamma function?

Many thanks in advance