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 dict to live point bug #119

Merged
merged 3 commits into from
Oct 26, 2021
Merged

Fix dict to live point bug #119

merged 3 commits into from
Oct 26, 2021

Conversation

mj-will
Copy link
Owner

@mj-will mj-will commented Oct 26, 2021

Fix a bug when calling dict_to_live_points with a dictionary containing floats.

Example

Python 3.8.5 (default, Sep  4 2020, 07:30:14) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from nessai.livepoint import dict_to_live_points
>>> d = dict(a=1.0, b=2.0)
>>> dict
dict(                 dict_to_live_points(  
>>> dict_to_live_points(d)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/michael/git_repos/nessai/nessai/livepoint.py", line 130, in dict_to_live_points
    N = len(list(d.values())[0])
TypeError: object of type 'float' has no len()
>>> 

@mj-will mj-will added the bug Something isn't working label Oct 26, 2021
@mj-will mj-will added this to the v0.3.3 milestone Oct 26, 2021
@mj-will mj-will merged commit f09d3bb into main Oct 26, 2021
@mj-will mj-will deleted the fix-dict-to-live-point-bug branch October 26, 2021 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant