Enhanced Transformer architecture for in-context learning of dynamical systems