python - Python 2 中的 K.<v> 表示法

标签 python python-2.7 sage

合一example of Sage math (搜索 octahedral )有这一行:

K.<v> = sage.groups.matrix_gps.finitely_generated.CyclotomicField(10)

这是什么 .<v>做什么?

最佳答案

SageMath 代码不是 Python,尽管非常相似。语法

A.<b> = C(d, e, f)

在SageMath中大致相当于下面的Python代码

A = C(d, e, f, names=('b',))
b = A.gen()

即,首先创建父环A,生成器名为'b',然后变量b被初始化为生成器的 A

您可以使用函数 preparse() 查看任何 SageMath 语句被翻译成什么:

sage: preparse('A.<b> = C(d, e, f)')
"A = C(d, e, f, names=('b',)); (b,) = A._first_ngens(1)"

关于python - Python 2 中的 K.<v> 表示法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54011089/

相关文章:

python - 如何在 Redhat Linux 上安装 pip

numpy - 赛通错误 : Undeclared name not built in:array

python - 添加多个约束到 scipy 最小化,自动生成约束字典列表?

python - 从符号多项式获取向量空间坐标

python - 输出在同一行打印,Py3k

python - 从字典键中的所有元组中提取特定位置

python - Selenium Python 在 IE 中使用 window.scroll 向下滚动页面对我不起作用

python - qpython android IOError : [Erno 2] No such file or directory

python - 如何解决IOError :broken data stream when reading image file?

python - 无法按位置或属性匹配时在 BeautifulSoup 中提取标签值