I still don’t know what x_data_shared or y_data_shared are. However, it looks like you are trying to manipulate predicted as if it is a numpy array. predicted is an arviz InferenceData object, which is basically an xarray object. If you need to manipulate this object “by hand”, you need to do so as one would do with an xarray object, not a simple numpy array.