This should work (although it’s more “clean” to select the prior group with az.summary(idata, group='prior').
Could you share a bit more of your model? This doesn’t seem like an error coming from az.summary, I would expect it instead from a shape issue in the model code.