v2.24.0 (28 July 2020)
Cmdstan updated to 2.24.0 (release notes)
New functions:
algebra_solver_newton
matrix hmm_hidden_state_prob(matrix, matrix, vector)
int[] hmm_latent_rng(matrix, matrix, vector)
real hmm_marginal(matrix, matrix, vector)
T lambert_w0(T)
, for any T
T lambert_w1(T)
, for any T
matrix matrix_power(matrix, int)
real multinomial_logit_log(int[], vector)
real multinomial_logit_lpmf(int[], vector)
int[] multinomial_logit_rng(vector, int)
ode_adams
, ode_adams_tol
ode_bdf
, ode_bdf_tol
ode_rk45
, ode_rk45_tol
T pow(int, T)
T pow(real, T)
T pow(T, int)
T pow(T, real)
(previously only real pow(real, real) was available)
T reverse(T)
, where T is vector, row_vector or an array of any type
matrix identity_matrix(int)
real[] linspaced_array(int, real, real); row_vector linspaced_row_vector(int, real, real); vector linspaced_vector(int, real, real)
int[] one_hot_int_array(int, int); real[] one_hot_array(int, int); row_vector one_hot_row_vector(int, int); vector one_hot_vector(int, int)
int[] ones_int_array(int); real[] ones_array(int); row_vector ones_row_vector(int); vector ones_vector(int)
vector uniform_simplex(int)
int[] zeros_int_array(int); real[] zeros_array(int); row_vector zeros_row_vector(int); vector zeros_vector(int)
New features:
- pedantic mode
- experimental optimization mode
- new integer division operator
%/%
- non-scalar values are now allowed in lower, upper, offset and multiplier
- integrate_ode_* functions are now deprecated
- data-only restricted functions now work with parameters in generated quantities
- improved out-of-bounds messages for vectors, matrices
- added checks for invalid literals
--allow_undefined
and--include_paths
are deprecated in favor of--allow-undefined
and--include-paths
- cleaned up the generated model C++ code: model is now final, using statements instead of typedef, better use of inline, use of
.clear()
instead of.resize(0)
, remove unnecessary functions - cleaned up the OCaml code: better use of helper functions, removed duplicate functions, better exception messages, replace imperative code for handling Stan Math signatures
- size expressions for parameters and generated quantities are now only evaluated once
- better handle model names that are not C++ friendly (start with numbers, have non-alphanumeric characters)
Bugfixes:
- changed the loop index type to int to prevent issues when using it in expressions with signed numbers
- integer arrays now initialize to the smallest representable integer
- var arrays initialize with a prebuilt dummy var, to not creat new varis
- all map_rect calls are registered when using MPI
- _lpdf/_lpmf functions are now used instead of *_log when generating code for the tilde statements
- single argument distribution do not require the vertical bar anymore (e.g. std_normal_lpdf(x|))
- fixed a bug that caused tilde statements to conflict with userdef functions
- rng functions are no longer allowed in size declarations
- fixed the _lpdf functor struct so that UDF with _log and int argument now compile
- fixed array literal type-checking
- fixed the error messages for missing input (line number is now displayed properly)
- fixed indexing in transform_init()
- fixed emitting generated quantities only (for gq_writer)
- fixed debug data generator for constrained matrix types and added array value bounds
© 2020 GitHub, Inc.