-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Labels
BugIssues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)ORNL TeamIssues and pull requests managed by the ORNL development teamIssues and pull requests managed by the ORNL development team
Milestone
Description
Describe the bug
In scripts/SCD_Reduction/BVGFitTools.py lines 339-341, the code uses np.xrange() which does not exist in NumPy and never has:
for i in np.xrange(QX.shape[0]):
for j in np.xrange(QX.shape[1]):
for k in np.xrange(QX.shape[2]):
This appears to be a remnant from Python 2 where xrange was a builtin function, with an erroneous np. prefix added.
Fix
Should use Python's builtin range():
for i in range(QX.shape[0]):
for j in range(QX.shape[1]):
for k in range(QX.shape[2]):
Impact
The getXTOF() function in BVGFitTools.py will raise AttributeError: module 'numpy' has no attribute 'xrange' if called.
Environment:
- Mantid version: 6.14.0.3
- File: scripts/SCD_Reduction/BVGFitTools.py
Platform/Version (please complete the following information):
- OS: GNU Guix
- OS Version: 1.5.0
- Mantid Version commit 4574b7c
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugIssues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)ORNL TeamIssues and pull requests managed by the ORNL development teamIssues and pull requests managed by the ORNL development team