inducer / pyopencl

OpenCL integration for Python, plus shiny features
http://mathema.tician.de/software/pyopencl
Other
1.04k stars 239 forks source link

Add types and cleanup docs in scan.py #650

Closed alexfikl closed 1 year ago

alexfikl commented 1 year ago

Similar to #648.

alexfikl commented 1 year ago

For some reason the types don't render in the docs (at least locally). There are no errors from sphinx, so I'll have to do some more digging :\

Screenshot_20221031_094812

alexfikl commented 1 year ago

Managed to figure out what was going on in there :\

For future reference (if nothing else) the issue was with index_dtype: Any = <class 'numpy.int32'>. Basically sphinx would to a repr(np.int32) to make the whole signature into a string and then later on do a ast.parse to add back hyperlinks. The parse would then throw a SyntaxError on that part and abort the whole thing :cry:

inducer commented 1 year ago

Thanks!