For example, running this on Jupyter notebook (py3.6):
mist = MIST_Isochrone()#masses, logages, FeHs:m,a,f=np.random.normal(1.0,0.1,1000),np.random.normal(8.5,0.1,1000),np.random.normal(0.0,0.1,1000)rads0=mist.radius(m,a,f) #this works fine#Adding some NaNs in the logagechx=np.random.random(1000)a[chx>0.45]=np.tile(np.nan,(chx>0.45).sum())#Runningrads=mist.radius(m,a,f)
The code just hangs infinitely, and I have to manually kill the kernel (interrupting doesn't work) and run everything else in my ipynb again.
I could definitely just put some code to catch them and return NaNs instead of running mist.radius, but equally I feel like this could be put in the function itself, and certainly any infinite loops should be caught and excepted!
Thanks for raising this. I have some time now for some housekeeping with this code, so I can look into this, but also feel free to submit a PR to correct this in the custom interpolation code.
For example, running this on Jupyter notebook (py3.6):
mist = MIST_Isochrone()
#masses, logages, FeHs:
m,a,f=np.random.normal(1.0,0.1,1000),np.random.normal(8.5,0.1,1000),np.random.normal(0.0,0.1,1000)
rads0=mist.radius(m,a,f) #this works fine
#Adding some NaNs in the logage
chx=np.random.random(1000)
a[chx>0.45]=np.tile(np.nan,(chx>0.45).sum())
#Running
rads=mist.radius(m,a,f)
The code just hangs infinitely, and I have to manually kill the kernel (interrupting doesn't work) and run everything else in my ipynb again.
I could definitely just put some code to catch them and return NaNs instead of running mist.radius, but equally I feel like this could be put in the function itself, and certainly any infinite loops should be caught and excepted!