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

parameter_sweep crashes when sweeping over only one parameter #1

Open
seanpolyn opened this issue Jun 26, 2020 · 0 comments
Open

parameter_sweep crashes when sweeping over only one parameter #1

seanpolyn opened this issue Jun 26, 2020 · 0 comments

Comments

@seanpolyn
Copy link
Collaborator

I was trying to just sweep over B_rec, but it kept crashing. Then I added B_enc to the param_names and it worked. It may be easiest to replicate by taking the plot_sweep_B code and removing B_enc from the param_names. I don't want to upload my scratch script into the cymr project, and it won't let me attach a py file here.

Here's the error output when there's just one param being swept over, "name must be a hashable type"

File "/Users/polyn/PycharmProjects/cymr_dev/tutorial.py", line 79, in
results = model.parameter_sweep(study, param, param_name, param_sweep,
File "/Users/polyn/opt/anaconda3/envs/cymr_dev/lib/python3.8/site-packages/cymr/fit.py", line 650, in parameter_sweep
results.index.rename(param_names, inplace=True)
File "/Users/polyn/opt/anaconda3/envs/cymr_dev/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 1378, in rename
return self.set_names([name], inplace=inplace)
File "/Users/polyn/opt/anaconda3/envs/cymr_dev/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 1325, in set_names
idx._set_names(names, level=level)
File "/Users/polyn/opt/anaconda3/envs/cymr_dev/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 1245, in _set_names
raise TypeError(f"{type(self).name}.name must be a hashable type")
TypeError: Float64Index.name must be a hashable type

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

No branches or pull requests

1 participant