I have a DataArray that I want to convert to a numpy array. For reference it's a three dimensional gridded dataset containing (time, latitude, longitude). I have tried using xarray.DataArray.values(), but receive the error: TypeError: 'property' object is not callable.
I want to transform it into a numpy array as I'm using a function that utilizes the reshape capabilities and won't work properly with the DataArray. I've tried simply converting it to a numpy array using np.array(), but it converts every value into a NaN.
datatlt=xr.open_dataset("/nfs/home11/staff/lzhou/Public/Satellite_data/RSS_Tb_Anom_Maps_ch_TLT_V4_0.nc", decode_times=False)
tlt=datatlt['brightness_temperature'].sel(months=slice(121,492))
tlt2=np.ma.masked_invalid(tlt)
tlt2=xr.DataArray.values(tlt2)