Jun-26-2018, 07:06 PM
You are abusing both numpy and Python
Iteration over indices is extremely un-Pythonic
vari[~np.isnan(vari)].tolist()will give you the list of non-NaN values in your array.
Iteration over indices is extremely un-Pythonic
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.