鉴于模块中的以下函数,mymodule我想使用 Sphinx 进行记录autodoc:
from typing import Union\nfrom collections.abc import Iterable\nfrom numpy.typing import ArrayLike\n\ndef foo(a: Union[str, int], b: Iterable, c: ArrayLike) -> None:\n """Do something useful."""\n pass\nRun Code Online (Sandbox Code Playgroud)\n在源代码中,函数的签名非常可读。但是,在生成的文档中autodoc但是,在签名
\n\nkhadl._util.foo(a:Union [str,int],b:collections.abc.Iterable,c:Union [int,float,complex,str,字节,numpy.generic,Sequence [Union [int,float,complex] , str, bytes, numpy.generic]], 序列[序列[任意]], numpy.typing._array_like._SupportsArray]) \xe2\x86\x92 无
\n
这是不可读的。源自模块的类typing以简短形式显示(Union, Sequence, Any),但对于抽象基类,Iterable会生成唯一标识符(collections.abc.Iterable),ArrayLike甚至“解包”(Union[int, float, complex, str, bytes, numpy.generic, Sequence[Union[int, float, complex, str, bytes, numpy.generic]], Sequence[Sequence[Any]], …
我有一个函数,假设f(theta, phi) = sqrt(1 - (sin(theta)*sin(phi))**2) + 5 * sqrt(1 - (sin(theta)*cos(phi))**2)我想在球体表面绘制颜色图。但是,我不知道如何splot在不首先生成表中包含适当值的文件的情况下将这个函数输入到其中以实现此目的。
我怎样才能gnuplot做到这一点?