Skip to content

Stan signature expression tests should support complex numbers #2676

Description

@WardBrian

Some math tests are triggered off the output of signatures from stanc. These were never updated to include complex numbers as a scalar, and particularly with complex_matrix etc coming we should add this.

See:

math/test/sig_utils.py

Lines 15 to 27 in 01dd2e7

arg_types = {
"int": "int",
"array[] int": "std::vector<int>",
"array[,] int": "std::vector<std::vector<int>>",
"real": "SCALAR",
"array[] real": "std::vector<SCALAR>",
"array[,] real": "std::vector<std::vector<SCALAR>>",
"vector": "Eigen::Matrix<SCALAR, Eigen::Dynamic, 1>",
"array[] vector": "std::vector<Eigen::Matrix<SCALAR, Eigen::Dynamic, 1>>",
"row_vector": "Eigen::Matrix<SCALAR, 1, Eigen::Dynamic>",
"array[] row_vector": "std::vector<Eigen::Matrix<SCALAR, 1, Eigen::Dynamic>>",
"matrix": "Eigen::Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic>",
}

This will need to add mappings for complex (std::complex<SCALAR>) and similar for the container types

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions