rmcelreath / rethinking

Statistical Rethinking course and book package
2.17k stars 606 forks source link

Solving deprecation warning in arrays (pre-stan 2.32.0) #368

Open epkanol opened 1 year ago

epkanol commented 1 year ago

Got this warning when building a model with an array type:

Warning in '/tmp/RtmpiMFONB/model-2a3a61c8837e.stan', line 4, column 4: Declaration
    of arrays by placing brackets after a variable name is deprecated and
    will be removed in Stan 2.32.0. Instead use the array keyword before the
    type. This can be changed automatically using the auto-format flag to
    stanc

According to the home page, stan is now at 2.31.0, meaning that in the next minor version the current syntax for arrays will be removed. Unfortunately I do not (yet) have the competence to submit a patch, so I just raise the question if it is in the pipe to sort this warning out before stan 2.32.0 hits the CRAN?

rmcelreath commented 1 year ago

The Experimental branch has a patch for this. It probably needs some more testing though.