I have an allegedly easy to solve question, but i still cannot figure it out:
I have an array with 1000 numbers called "mu" like this:
array([2.25492522e-01, 2.21059993e-01, 2.16757006e-01,....)
Now i need to plug these values in two different functions: For numbers in the array, that are less than 0.009, i need to use equation1:
nu = 1 - 5.5 * mu**(0.66) + 3.77 * mu
For all other numbers in the array, i need to plug these into equation2:
nu = 0.819**(-11.5*mu)+0.0975**(-70.1*mu)
In the end, i need an array of the function values "nu".
I gave this code a try, but it didn't work
for item in mu:
if item < 0.009:
nu = 1 - 5.5 * mu**(0.66) + 3.77 * mu
else:
nu = 0.819**(-11.5*mu)+0.0975**(-70.1*mu)
print nu
How can I tell Python to put the right numbers in?