MCPcopy Create free account
hub / github.com/numpy/numpy / as_integer

Function as_integer

numpy/f2py/symbolic.py:963–971  ·  view source on GitHub ↗

Return object as INTEGER constant.

(obj, kind=4)

Source from the content-addressed store, hash-verified

961
962
963def as_integer(obj, kind=4):
964 """Return object as INTEGER constant.
965 """
966 if isinstance(obj, int):
967 return Expr(Op.INTEGER, (obj, kind))
968 if isinstance(obj, Expr):
969 if obj.op is Op.INTEGER:
970 return obj
971 raise OpError(f'cannot convert {obj} to INTEGER constant')
972
973
974def as_real(obj, kind=4):

Callers 3

as_termsFunction · 0.85
as_term_coeffFunction · 0.85
processMethod · 0.85

Calls 2

ExprClass · 0.85
OpErrorClass · 0.85

Tested by

no test coverage detected