How to use apply_ufunc with numpy.digitize for each image along time dimension of xarray.DataArray?
问题 I've rephrased my earlier question substantially for clarity. Per Ryan's suggestion on a separate channel, numpy.digitize looks is the right tool for my goal. I have of an xarray.DataArray of shape x, y, and time. I've trying to puzzle out what values I should supply to the apply_ufunc function's 'input_core_dims' and 'output_core_dims' arguments in order to apply numpy.digitize to each image in the time series. Intuitively, I want the output dimensions to be ['time', 'x', 'y']. I think the