ArcGIS字段计算器中的python函数(转发)

原作者: sxzhusta

.conjugate(),共轭复数

.denominator(),返回分母

.imag(),返回复数的虚数部分

.numerator(),返回分子

.real(),返回复数的实数部分

.as_interger_ratio():

返回一对整数,其比例正好等于原浮动,并带有正分母。

.fromhex():

类方法返回用十六进制字符串S表示的浮动。字符串可能有前向和后向空格。

.hex():

返回浮点数作为十六进制字符串的表示形式。对于有限浮点数,这种表示法将总是包括一个引数0x和一个尾随的P和指数。

.is_integer():

如果浮动实例具有积分值是有限的,则返回真,否则返回假:

math.acos():反余弦(弧度)

math.acosh():反双曲余弦

math.asin():反正弦

math.asinh():反双曲正弦

math.atan():反正切

math.atan2():

返回Atan(/x),以弧度为单位。结果是介于圆周率和圆周率之间。平面上的向量从原点到点(X,Y)使得这个角度与正x轴。

math.atanh():反双曲正切

math.ceil():

返回X的上限为浮点数,小于或等于?的最小整数值

math.copysign():
在支持已签名零的平台上返回带有Y符号的X,复制符号(1.0,-0.0)返回-1.0。

math.cos():余弦

math.cosh():双曲余弦

math.degrees():转弧度为度

math.e():e

math.exp():e的指数次方

math.fabs():绝对值

math.factorial():

返回X阶乘。

math.floor():

Return the floor of x as a float, the largest integer value less than or equal tox.(小于等于x的最大整数)

math.fmod():

Return fmod(x,y), as defined by the platform C library. Note that the Python expressionx%y may not return the same result. The intent of the C standard is thatfmod(x,y) be exactly (mathematically; to infinite precision) equal tox-n*y for some integer n such that the result has the same sign asx and magnitude less thanabs(y). Python’sx%y returns a result with the sign ofy instead, and may not be exactly computable for float arguments. For example,fmod(-1e-100,1e100) is -1e-100, but the result of Python’s-1e-100%1e100 is 1e100-1e-100, which cannot be represented exactly as a float, and rounds to the surprising1e100. For this reason, functionfmod() is generally preferred when working with floats, while Python’sx%y is preferred when working with integers.

matn.frexp():

Return the mantissa and exponent of x as the pair (m, e). m is a float ande is an integer such thatx==m *2**e exactly. Ifx is zero, returns (0.0,0), otherwise 0.5<= abs(m)<1. This is used to “pick apart” the internal representation of a float in a portable way.

math.fsum():

Return an accurate floating point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums:

math.htpot():

Return the Euclidean norm, sqrt(xx+yy). This is the length of the vector from the origin to point(x,y).

math.isinf():Check if the float x is positive or negative infinity

math.isnan():Check if the float x is a NaN (not a number). For more information on NaNs, see the IEEE 754 standards

math.ldexp():Return x * (2**i). This is essentially the inverse of functionfrexp()

math.log():以e为底的对数

math.log10():以10为底对数

math.log1p():Return the natural logarithm of 1+x (base e). The result is calculated in a way which is accurate forx near zero

math.modf():Return the fractional and integer parts of x. Both results carry the sign ofx and are floats.

math.pi():π

math.pow():x的y次幂

math.radians():转度为弧度

math.sin():正弦

math.sinh():双曲正弦

math.sqrt():平方根

math.tan():正切

math.tanh():双曲正切

matn.trunc():Return the Real valuex truncated to anIntegral (usually a long integer). Uses the__trunc__ method

猜你喜欢

转载自blog.csdn.net/GIS_yingyong/article/details/90209281