合一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/