stan-dev / stan-dev/math

vector distribution tests should test with vectors of not all the same values

Open
#1,978 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

There was a bug in an lcdf distribution that would have been caught if the vectorized versions of the CDFs were tested with vectors of different values (https://github.com/stan-dev/math/issues/1662).

Right now the vectorized tests build vectors of the same value (see the repeat_as_vector test).

This would have been caught if there was a test that tested vectorized vs. non-vectorized versions of the functions where it's not just a repeat of the same value (see discussion here).

Current Version:

v3.2.0

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.

Research direction

Start in test/prob/test_fixture_cdf.hpp at the repeat_as_vector test and inspect how the vectorized CDF tests are built. Compare vectorized and non-vectorized results using vectors containing different values; this is done when the tests no longer only repeat one value and would expose the referenced distribution discrepancy.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.