def x1(ap,dp,ph,e1,e2,e3,e4,e5,y):

if Delta(ap,dp,ph,e1,e2,e3,e4,e5,y) >= 0:

return 2*(b(ap,dp,ph,e1,e2,e3,e4,e5,y)**3) - 9 ab(ap,dp,ph,e1,e2,e3,e4,e5,y)c(ap,dp,ph,e1,e2,e3,e4,e5,y) + 27(a**2)

*d(ap,dp,ph,e1,e2,e3,e4,e5,y)*

else:

return None

def y1(ap,dp,ph,e1,e2,e3,e4,e5,y):

if Delta(ap,dp,ph,e1,e2,e3,e4,e5,y) >= 0:

return 3np.sqrt(3)

else:

return None

def y1(ap,dp,ph,e1,e2,e3,e4,e5,y):

if Delta(ap,dp,ph,e1,e2,e3,e4,e5,y) >= 0:

return 3

*a*np.sqrt(Delta(ap,dp,ph,e1,e2,e3,e4,e5,y))

else:

return None

This is creating a problem

```
return np.sqrt(x1(ap,dp,ph,e1,e2,e3,e4,e5,y)**2+y1(ap,dp,ph,e1,e2,e3,e4,e5,y)**2)
```

TypeError: unsupported operand type(s) for ** or pow(): ‘NoneType’ and ‘int’

I think the main problem is due to the condition for Delta>=0 which returns a None value for some input dataset but I only need the Delta>=0 condition values