The Math library isn’t general enough to deal with Eigen’s fixed-size matrix/vectors… we really need to do that rewrite to use either Eigen Refs or Eigen’s templated base classes (maybe EigenBase is most general?).
But we could use that information very nicely for optimization in stanc3. You can currently do this by just defining these as constants in your Stan model, though it’s very frustrating you can’t define e.g. N=20 for use in the data
block (perhaps an argument to collapse the transformed data and data blocks into a single block?). Otherwise we could have the compiler take that information in at compile time and generate a model that only works with those sizes and throw an exception if any other sizes are passed in. Sort of a weird UX though. If we ultimately ship an interpreter, that distinction totally blurs and we can do optimization at runtime based on all of the actual data.