python - pycharm 没有正确显示文档字符串数学?
问题描述
正如标题所说,每当我在 pycharm 中查看文档字符串时,即使在阅读模式下我也看不到正确的数学,我认为应该向我展示数学而不是生成数学的“代码”。
谁能告诉我如何解决这个问题,因为尝试阅读此类复杂数学函数的文档字符串非常烦人。
这就是我将 .py 文件转换为 .md 时发生的情况
该文件可以被读取,但数学仍然没有被解释。我需要一些特殊的乳胶插件吗?
当我将其转换为 .rst 时,我得到以下信息:
很明显,这种格式在 pycharm 中根本不起作用。
Edit2:根据要求,我添加了一个包含数学的文档字符串的类。
class FullyConnectedTensorProduct(TensorProduct):
r"""Fully-connected weighted tensor product
All the possible path allowed by :math:`|l_1 - l_2| \leq l_{out} \leq l_1 + l_2` are made.
The output is a sum on different paths:
.. math::
z_w = \sum_{u,v} w_{uvw} x_u \otimes y_v + \cdots \text{other paths}
where :math:`u,v,w` are the indices of the multiplicities.
Parameters
----------
irreps_in1 : `Irreps`
representation of the first input
irreps_in2 : `Irreps`
representation of the second input
irreps_out : `Irreps`
representation of the output
normalization : {'component', 'norm'}
see `TensorProduct`
internal_weights : bool
see `TensorProduct`
shared_weights : bool
see `TensorProduct`
"""
解决方案
推荐阅读
- python - 在分页中有效地迭代字典列表
- android - Fitness startBleScan 成功,但扫描因 MI Band 2 而停止
- java - 如何选择 ArrayList 中元素的索引并更改其属性之一?
- excel - 将图像文件(如果存在)复制到目标文件夹
- java - Java - 按降序遍历 Mapset,返回所需的输出
- java - 将单词添加到字典中,打印要显示的条目
- material-design - 在将主要/次要颜色归因于元素时,您可以指定浅色或深色变体吗?
- swift - 使用外部类自定义我的标签栏高度?
- matrix - 如何在 Scilab 的循环内制作动态矩阵?
- c# - 在没有完整类型声明的情况下创建字典作为参数的更短方法