Skip to content

Commit 1552ee5

Browse files
committed
Picking lint
2 parents dbedf09 + 23be8c4 commit 1552ee5

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

bin/numpy-1.26-reinst.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
$!/usr/bin/env Bash
1+
#!/usr/bin/env bash
22

33
CFLAGS="-I/System/Library/Frameworks/vecLib.framework/Headers -Wl,-framework -Wl,Accelerate -framework Accelerate" pip install numpy==1.26.* --force-reinstall --no-deps --no-cache --no-binary :all: --no-build-isolation --compile -Csetup-args=-Dblas=accelerate -Csetup-args=-Dlapack=accelerate -Csetup-args=-Duse-ilp64=true

bin/numpybench

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ parser.add_argument(
4747
args = parser.parse_args()
4848

4949
# Open output file if specified
50-
output_file = None
50+
OUTPUT_FILE = None
5151
if args.output:
52-
output_file = open(args.output, "w", encoding="utf-8")
52+
OUTPUT_FILE = open(args.output, "w", encoding="utf-8")
5353

5454

5555
def print_with_timestamp(message, file=None):
@@ -76,37 +76,37 @@ def do_tests():
7676
- Matrix summation (np.sum)
7777
"""
7878
size = 2500
79-
A = np.random.rand(size, size)
80-
B = np.random.rand(size, size)
79+
a = np.random.rand(size, size)
80+
b = np.random.rand(size, size)
8181

8282
# Number of iterations
8383
iterations = args.count
8484

8585
tests = [
86-
("Matrix multiplication", lambda: np.dot(A, B)),
87-
("Matrix transposition", lambda: np.transpose(A)),
88-
("Eigenvalue computation", lambda: np.linalg.eigvals(A)),
89-
("Fourier transformation", lambda: np.fft.fft(A)),
90-
("Summation", lambda: np.sum(A)),
86+
("Matrix multiplication", lambda: np.dot(a, b)),
87+
("Matrix transposition", lambda: np.transpose(a)),
88+
("Eigenvalue computation", lambda: np.linalg.eigvals(a)),
89+
("Fourier transformation", lambda: np.fft.fft(a)),
90+
("Summation", lambda: np.sum(a)),
9191
]
9292

9393
for name, test_func in tests:
94-
print_with_timestamp(f"BEGIN TEST: {name}", file=output_file)
94+
print_with_timestamp(f"BEGIN TEST: {name}", file=OUTPUT_FILE)
9595
start = time.time()
9696
for _ in range(iterations):
9797
test_func()
9898
end = time.time()
9999
print_with_timestamp(
100-
f"Time for {name.lower()}: {(end - start):.4f} seconds", file=output_file
100+
f"Time for {name.lower()}: {(end - start):.4f} seconds", file=OUTPUT_FILE
101101
)
102-
print_with_timestamp("END TEST / BEGIN NEXT TEST", file=output_file)
102+
print_with_timestamp("END TEST / BEGIN NEXT TEST", file=OUTPUT_FILE)
103103

104104

105105
def main():
106106
"""Run the NumPy benchmark suite."""
107107
print_with_timestamp(
108108
f"Producing information for VENV ----> {os.getenv('CONDA_DEFAULT_ENV')}",
109-
file=output_file,
109+
file=OUTPUT_FILE,
110110
)
111111

112112
# Capture np.show_config() output and print it line by line with timestamps
@@ -117,17 +117,17 @@ def main():
117117
sys.stdout = old_stdout
118118

119119
for line in new_stdout.getvalue().split("\n"):
120-
print_with_timestamp(line, file=output_file)
120+
print_with_timestamp(line, file=OUTPUT_FILE)
121121

122122
if args.skip_tests:
123123
print_with_timestamp(
124-
"############### SKIPPING PERFORMANCE CHECKS", file=output_file
124+
"############### SKIPPING PERFORMANCE CHECKS", file=OUTPUT_FILE
125125
)
126126
else:
127127
do_tests()
128128

129-
if output_file:
130-
output_file.close()
129+
if OUTPUT_FILE:
130+
OUTPUT_FILE.close()
131131

132132

133133
if __name__ == "__main__":

manifest.lst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ d | docs/shdoc/bin/shinclude | docs/shdoc/bin/shinclude | functions | 755 | |
1111
d | docs/shdoc/bin/shinclude | docs/shdoc/bin/shinclude | scripts | 755 | | | 256 |
1212
f | | | LICENSE | 644 | | | 11362 | fbb090d446bc51f5b8611e8c59bddf5447f155e2
1313
f | | | README.md | 644 | | | 16044 | d5491b1d2c3c353d096a32bf311ebfc8a03c7717
14-
f | | | manifest.lst | 644 | | | 17641 | dea01fd34c49bac3344b6feda1e5a89ea229fee8
14+
f | | | manifest.lst | 644 | | | 17641 | 6b36964b1372cf89b0e06858521afd7fe6023a64
1515
f | | | setup.cf | 644 | | | 799 | b61b02ff439616b7f46a85b4e3ae3078f3282073
1616
f | | | setup.sh | 755 | | | 20706 | e37ac02cbcf2826707c1463fbc09b5bba50c9f9d
1717
f | bin | bin | buildvenvs | 755 | | | 14995 | acd98e35e3b7052dd1e068729169855f204efd6c
@@ -21,8 +21,8 @@ f | bin | bin | filter-vm_stat | 755 | | | 2606 | 7eccba1613a50f1be68e3bb02632
2121
f | bin | bin | generate_manifest.sh | 755 | | | 5707 | 1f77e3ae38b7cd1a9c51951001205018175530b7
2222
f | bin | bin | genmd | 755 | | | 49545 | 8ee360e4bc7a5c8e4d35d14e1589cb0b71d8c386
2323
f | bin | bin | ld | 755 | | | 2697 | 61e28d8e54ae13b00d6c8f7e0cb4e01bc768b798
24-
f | bin | bin | numpy-1.26-reinst.sh | 755 | | | 343 | df58788f400d8d1b4571e95c2f486012469ca404
25-
f | bin | bin | numpybench | 755 | | | 3625 | 78261f0e3a8896713b01442674495c2bfbd0ac41
24+
f | bin | bin | numpy-1.26-reinst.sh | 755 | | | 343 | a1fcc77cd28f16dd6527ffa3c932a6206cdc9721
25+
f | bin | bin | numpybench | 755 | | | 3625 | dd5b984895064eb0b6f1ee7da318ac766732da1b
2626
f | bin | bin | numpyprof | 755 | | | 1579 | fe821ae6a607ff116a9ae9f9abc8483125cdfcac
2727
f | bin | bin | numpytime | 755 | | | 1423 | 14349c95f754bc9260a2bf6d4a84b1b6f1126336
2828
f | bin | bin | purgevenv | 755 | | | 905 | 5dccd04b18d676390fb85e45ff268c5ee0ce8d7d

0 commit comments

Comments
 (0)