stan-dev / stan-dev/math

Document Stan Math expressions requirements

Open
#2,736 1 comment 1 reaction 1 assignee View on GitHub

@rok-cesnovar is already working on this.

Since May 12, 2022.

Dominant language
C++
Stars
839
Forks
220
Avg merge
2d 4h
Merged PRs (30d)
14

Description

Stan Math functions that are meant to be exposed in the Stan language have 2 expressions requirements:

  • they have to be able to accept Eigen expressions
  • they have to work with the expressions efficiently (not evaluate them multiple times)

This is not really documented or expressed clearly for Stan Math developers I think. We need to mention this somewhere more prominently.

It should also mention that you can test expressions for a function not currently exposed in Stan by running:

python3 runTests.py test/expressions/ --only-function "foo(vector) => vector"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.