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

Nexus: fix type check for reblock_factors in qmc-fit #2830

Merged
merged 1 commit into from
Dec 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nexus/bin/qmc-fit
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def process_scalar_files(scalar_files,equils=None,reblock_factors=None,series_st
error('must provide one equilibration length per scalar file\nnumber of equils provided: {0}\nnumber of scalar files provided: {1}\nequils provided: {2}\nscalar files provided: {3}'.format(len(equils),len(scalar_files),equils,scalar_files))
#end if

if isinstance(reblock_factors,int):
if isinstance(reblock_factors,(int,np.int_)):
reblock_factors = len(scalar_files)*[reblock_factors]
elif reblock_factors is not None and len(reblock_factors)!=len(scalar_files):
error('must provide one reblocking factor per scalar file\nnumber of reblock_factors provided: {0}\nnumber of scalar files provided: {1}\nreblock_factors provided: {2}\nscalar files provided: {3}'.format(len(reblock_factors),len(scalar_files),reblock_factors,scalar_files))
Expand Down