Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "append_array" function to address Issue 481 #550

Conversation

bbbales2
Copy link
Member

@bbbales2 bbbales2 commented May 6, 2017

Submission Checklist

  • Run unit tests: ./runTests.py test/unit
  • Run cpplint: make cpplint
  • Declare copyright holder and open-source license: see below

Summary:

Addresses: #481

This replaces pull request: #531

Sorry for axing the old pull req, but the outdated fvar stuff was causing issues and I thought it would be better to rebase onto the updated Stan than try to figure it out. I've checked the fvar<fvar<var>>/fvar<fvar<double>> behavior and I think these tests make sense (though they are kinda verbose).

Side effects

Hopefully none

How to Verify:

./runTests.py test/unit/math/prim/arr/fun/append_array_test
./runTests.py test/unit/math/rev/arr/fun/append_array_test
./runTests.py test/unit/math/fwd/arr/fun/append_array_test
./runTests.py test/unit/math/mix/arr/fun/append_array_test

Reviewer Suggestions

Anyone

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): University of California, Santa Barbara

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@stan-buildbot
Copy link
Contributor

Can one of the admins verify this patch?

Copy link
Contributor

@bob-carpenter bob-carpenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those tests are way more verbose and detailed than they need to be. We can leave them, or you can simplify them. To test append(a, b), you only need to test that the results are equal to the results from a or from b---you shouldn't need to run autodiff, etc.

I'm OK with it going in as is, though. I'm going to go through and unify a lot of the higher-order testing in a testing framework that should make this all a lot easier. So maybe not much point trying to simplify for just this one test.

@bob-carpenter bob-carpenter merged commit ac0362e into stan-dev:develop May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants