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

[FIX] Re-add TupleList to DiscreteVariable #4879

Merged
merged 1 commit into from
Jul 3, 2020

Conversation

PrimozGodec
Copy link
Contributor

Issue

Fixes #4875

Description of changes

Re-add TupleList and write test

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #4879 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4879      +/-   ##
==========================================
- Coverage   84.17%   84.14%   -0.03%     
==========================================
  Files         282      277       -5     
  Lines       57464    56637     -827     
==========================================
- Hits        48368    47657     -711     
+ Misses       9096     8980     -116     

@PrimozGodec PrimozGodec changed the title Re-add TupleList to DiscreteVariable [FIX] Re-add TupleList to DiscreteVariable Jul 3, 2020
@@ -622,7 +625,7 @@ def __init__(
*, sparse=False
):
""" Construct a discrete variable descriptor with the given values. """
values = tuple(values) # some people (including me) pass a generator
values = TupleList(values) # some people pass a generator
Copy link
Contributor

Choose a reason for hiding this comment

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

Correct me if I'm wrong, but I think this can remain just tuple (for creating new instances) as long as the above is there for unpickling of saved older classes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right :)

@lanzagar lanzagar merged commit 2655592 into biolab:master Jul 3, 2020
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.

Re-add TupleList
2 participants