From 922161c0e641ff1ea4273fbfc8410686ec69b55a Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 11 Jul 2021 17:05:17 -0700 Subject: [PATCH] improve type annotation --- opencl_fdtd/simulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencl_fdtd/simulation.py b/opencl_fdtd/simulation.py index 70db2a9..4fa4bae 100644 --- a/opencl_fdtd/simulation.py +++ b/opencl_fdtd/simulation.py @@ -357,7 +357,7 @@ class Simulation(object): return pyopencl.array.to_device(self.queue, vec(initial_value).astype(self.arg_type)) -def type_to_C(float_type) -> str: +def type_to_C(float_type: numpy.dtype) -> str: """ Returns a string corresponding to the C equivalent of a numpy type. Only works for float16, float32, float64.