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

Allow NestedSamples to take lists as well as numpy arrays as constructors #190

Merged
merged 3 commits into from
Jul 12, 2022

Conversation

williamjameshandley
Copy link
Collaborator

Description

Currently NestedSamples(data=...,logL=...,logL_birth=...) assumes that logL and logL_birth are numpy arrays. It shouldn't.

This adds a test which shows this behaviour, and then fixes with a quick conversion.

Checklist:

  • I have performed a self-review of my own code
  • My code is PEP8 compliant (flake8 anesthetic tests)
  • My code contains compliant docstrings (pydocstyle --convention=numpy anesthetic)
  • New and existing unit tests pass locally with my changes (python -m pytest)
  • I have added tests that prove my fix is effective or that my feature works

@codecov
Copy link

codecov bot commented Jun 7, 2022

Codecov Report

Merging #190 (e56dba5) into master (48d6bc4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #190   +/-   ##
=======================================
  Coverage   95.65%   95.66%           
=======================================
  Files          17       17           
  Lines        1773     1775    +2     
=======================================
+ Hits         1696     1698    +2     
  Misses         77       77           
Impacted Files Coverage Δ
anesthetic/samples.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48d6bc4...e56dba5. Read the comment docs.

@williamjameshandley williamjameshandley marked this pull request as ready for review June 7, 2022 10:50
Copy link
Collaborator

@lukashergt lukashergt left a comment

Choose a reason for hiding this comment

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

Looks good. Feel free to squash and merge.

@williamjameshandley williamjameshandley merged commit 0e44c90 into master Jul 12, 2022
@williamjameshandley williamjameshandley deleted the list_logL branch July 12, 2022 08:47
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.

2 participants