sympy.Integer()方法
在sympy.Integer()方法的帮助下,我们可以将浮点数转换为整数值,如果我们想保存整数值,这种方法在内存方面非常有效。
语法:sympy.Integer()
Return:返回整数值。
sympy.Integer()方法 例# 1:
在本例中,我们可以看到,通过使用sympy.Integer()方法,我们能够将浮点值转换为整数或优化内存消耗。
Output :
100
sympy.Integer()方法 例# 2:
Output :
20