From d33209e68057b10c701f52967290b169884f7a17 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 5 Aug 2015 11:55:32 -0400 Subject: [PATCH] BF: Fix benchmark range bounds --- nibabel/benchmarks/bench_array_to_file.py | 2 +- nibabel/benchmarks/bench_finite_range.py | 2 +- nibabel/benchmarks/bench_load_save.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nibabel/benchmarks/bench_array_to_file.py b/nibabel/benchmarks/bench_array_to_file.py index 26be0c948f..159fb3ae93 100644 --- a/nibabel/benchmarks/bench_array_to_file.py +++ b/nibabel/benchmarks/bench_array_to_file.py @@ -50,7 +50,7 @@ def bench_array_to_file(): mtime = measure('array_to_file(arr, BytesIO(), np.int16)', repeat) print('%30s %6.2f' % ('Save float64 to int16, infs', mtime)) # Int16 input, float output - arr = np.random.random_integers(low=-1000,high=-1000, size=img_shape) + arr = np.random.random_integers(low=-1000, high=1000, size=img_shape) arr = arr.astype(np.int16) mtime = measure('array_to_file(arr, BytesIO(), np.float32)', repeat) print('%30s %6.2f' % ('Save Int16 to float32', mtime)) diff --git a/nibabel/benchmarks/bench_finite_range.py b/nibabel/benchmarks/bench_finite_range.py index 298345fa41..d10797dab5 100644 --- a/nibabel/benchmarks/bench_finite_range.py +++ b/nibabel/benchmarks/bench_finite_range.py @@ -42,7 +42,7 @@ def bench_finite_range(): mtime = measure('finite_range(arr)', repeat) print('%30s %6.2f' % ('float64 many infs', mtime)) # Int16 input, float output - arr = np.random.random_integers(low=-1000,high=-1000, size=img_shape) + arr = np.random.random_integers(low=-1000, high=1000, size=img_shape) arr = arr.astype(np.int16) mtime = measure('finite_range(arr)', repeat) print('%30s %6.2f' % ('int16', mtime)) diff --git a/nibabel/benchmarks/bench_load_save.py b/nibabel/benchmarks/bench_load_save.py index b2e140854e..a2a987cf0e 100644 --- a/nibabel/benchmarks/bench_load_save.py +++ b/nibabel/benchmarks/bench_load_save.py @@ -56,7 +56,7 @@ def bench_load_save(): mtime = measure('img.from_file_map(img.file_map)', repeat) print('%30s %6.2f' % ('Load from int16, NaNs', mtime)) # Int16 input, float output - arr = np.random.random_integers(low=-1000,high=-1000, size=img_shape) + arr = np.random.random_integers(low=-1000, high=1000, size=img_shape) arr = arr.astype(np.int16) img = Nifti1Image(arr, np.eye(4)) sio = BytesIO()