improve type annotation

This commit is contained in:
Jan Petykiewicz 2021-07-11 17:05:17 -07:00
parent da3216133a
commit 922161c0e6

View File

@ -357,7 +357,7 @@ class Simulation(object):
return pyopencl.array.to_device(self.queue, vec(initial_value).astype(self.arg_type)) 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. Returns a string corresponding to the C equivalent of a numpy type.
Only works for float16, float32, float64. Only works for float16, float32, float64.