Skip to content

Commit f18487a

Browse files
committed
Merge pull request #336 from effigies/benchmark_ranges
MRG: Fix benchmark range bounds Fix minus sign in random number limits in benchmarks.
2 parents ef8152a + d33209e commit f18487a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

nibabel/benchmarks/bench_array_to_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def bench_array_to_file():
5050
mtime = measure('array_to_file(arr, BytesIO(), np.int16)', repeat)
5151
print('%30s %6.2f' % ('Save float64 to int16, infs', mtime))
5252
# Int16 input, float output
53-
arr = np.random.random_integers(low=-1000,high=-1000, size=img_shape)
53+
arr = np.random.random_integers(low=-1000, high=1000, size=img_shape)
5454
arr = arr.astype(np.int16)
5555
mtime = measure('array_to_file(arr, BytesIO(), np.float32)', repeat)
5656
print('%30s %6.2f' % ('Save Int16 to float32', mtime))

nibabel/benchmarks/bench_finite_range.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def bench_finite_range():
4242
mtime = measure('finite_range(arr)', repeat)
4343
print('%30s %6.2f' % ('float64 many infs', mtime))
4444
# Int16 input, float output
45-
arr = np.random.random_integers(low=-1000,high=-1000, size=img_shape)
45+
arr = np.random.random_integers(low=-1000, high=1000, size=img_shape)
4646
arr = arr.astype(np.int16)
4747
mtime = measure('finite_range(arr)', repeat)
4848
print('%30s %6.2f' % ('int16', mtime))

nibabel/benchmarks/bench_load_save.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def bench_load_save():
5656
mtime = measure('img.from_file_map(img.file_map)', repeat)
5757
print('%30s %6.2f' % ('Load from int16, NaNs', mtime))
5858
# Int16 input, float output
59-
arr = np.random.random_integers(low=-1000,high=-1000, size=img_shape)
59+
arr = np.random.random_integers(low=-1000, high=1000, size=img_shape)
6060
arr = arr.astype(np.int16)
6161
img = Nifti1Image(arr, np.eye(4))
6262
sio = BytesIO()

0 commit comments

Comments
 (0)