Skip to content

[FIX] Re-add TupleList to DiscreteVariable#4879

Merged
lanzagar merged 1 commit intobiolab:masterfrom
PrimozGodec:readd-tuple-list
Jul 3, 2020
Merged

[FIX] Re-add TupleList to DiscreteVariable#4879
lanzagar merged 1 commit intobiolab:masterfrom
PrimozGodec:readd-tuple-list

Conversation

@PrimozGodec
Copy link
Contributor

Issue

Fixes #4875

Description of changes

Re-add TupleList and write test

Includes
  • Code changes
  • Tests
  • Documentation

@PrimozGodec PrimozGodec mentioned this pull request Jul 3, 2020
3 tasks
@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
):
""" 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