Open ferrine opened 1 year ago
None dims were disabled in https://github.com/pymc-devs/pymc/pull/6470 exactly because of this. They only worked when they were in the rightmost position.
Seems like the error is misleading then. It should prevent me from using None coord in the first place. However, I think it is a valid case. Why not just replacing None coord with anon coord?
If you try in main it should raise directly with a TypeError
Thank you!
Ah that's for Data
, not distributions. I don't know about that. In main it doesn't raise an error but I am not sure what it does.
Why not just replacing None coord with anon coord?
Someone needs to implement it and make sure it works with everything we have Data
, Deterministics
, Variables
. I made it raise an error for RVs in that linked PR because the infrastructure was not there yet.
Maybe the best would be to give dummy dims (without coordinates) as soon as we register a variable in the model
Is there a reason this is postponed?
I don't see what is gained by using None
, you can just give it any name. Why not use pm.Data("a", np.random.randn(2, 6), dims=("unamed_dim", "d2"), mutable=True)
or calling the dimension "none"
instead of using None
and adding code to convert that into a random dimension name? In pm.Data
instances dims don't need to be things in the coords
argument of the model, they will get registered automatically.
Although I'm not a fan, None
has the advantage that it won't name clash. So you don't need to worry whether a dim with the same name was already given to something else. This showed up in #7390
Describe the issue:
When setting a coord None. Something goes broken in pymc 5.0.2.
Reproduceable code example:
Error message:
PyMC version information:
pymc 5.0.2
Context for the issue:
No response