<jupyter_start><jupyter_text>Indexing a numpy array with a boolean area<jupyter_code>import numpy as np
arr = np.array([[1,2,3], [4,np.nan,np.nan], [np.nan,np.nan,5]])
arr
np.isnan(arr)
~np.isnan(arr)
arr[~np.isnan(arr)]<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup