summaryrefslogtreecommitdiff
path: root/numpy/linalg/lapack_lite
diff options
context:
space:
mode:
authorSista Seetaram <hanumaseetaram@gmail.com>2021-09-03 00:25:57 +0530
committerSista Seetaram <hanumaseetaram@gmail.com>2021-09-03 00:25:57 +0530
commite4a11cb29af12b0e67fda3f924585b23cee0b567 (patch)
tree183b79aa364bced690912d19419598a4eefea878 /numpy/linalg/lapack_lite
parent95d254027f2fb526fe4c745f330e6fa448a7e4db (diff)
downloadnumpy-e4a11cb29af12b0e67fda3f924585b23cee0b567.tar.gz
fixed unhashable instance and potential exception as listed in LGTM#19077
Diffstat (limited to 'numpy/linalg/lapack_lite')
-rw-r--r--numpy/linalg/lapack_lite/clapack_scrub.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/linalg/lapack_lite/clapack_scrub.py b/numpy/linalg/lapack_lite/clapack_scrub.py
index 738fad7fe..627c06dd4 100644
--- a/numpy/linalg/lapack_lite/clapack_scrub.py
+++ b/numpy/linalg/lapack_lite/clapack_scrub.py
@@ -299,6 +299,6 @@ if __name__ == '__main__':
source = scrub_source(source, nsteps, verbose=True)
- writefo = open(outfilename, 'w')
- writefo.write(source)
+ with open(outfilename, 'w') as writefo:
+ writefo.write(source)
writefo.close()