diff --git a/kernel_tuner/accuracy.py b/kernel_tuner/accuracy.py index 4dc59109b..1e958198b 100644 --- a/kernel_tuner/accuracy.py +++ b/kernel_tuner/accuracy.py @@ -109,7 +109,7 @@ def __init__( # We convert the array into a `np.ndarray` by using `np.array`. # However, if the value is a numpy scalar, then we do not want to # convert it into an array but instead keep the original value - if not np.isinstance(array, np.generic) + if not isinstance(array, np.generic): array = np.array(array) arrays[precision] = array.astype(dtype) diff --git a/kernel_tuner/core.py b/kernel_tuner/core.py index 7deb38678..f8e8e90da 100644 --- a/kernel_tuner/core.py +++ b/kernel_tuner/core.py @@ -607,7 +607,7 @@ def ready_argument_list(self, arguments): else: flat_args.append(argument) - flag_gpu_args = iter(self.dev.ready_argument_list(flat_args)) + flat_gpu_args = iter(self.dev.ready_argument_list(flat_args)) # Unflatten the arguments back into arrays. gpu_args = [] @@ -615,11 +615,11 @@ def ready_argument_list(self, arguments): if isinstance(argument, Tunable): arrays = dict() for key in argument: - arrays[key] = next(flag_gpu_args) + arrays[key] = next(flat_gpu_args) gpu_args.append(Tunable(argument.param_key, arrays)) else: - gpu_args.append(next(flag_gpu_args)) + gpu_args.append(next(flat_gpu_args)) return gpu_args