4 examples of 'return value of trunc() in python' in Python

Every line of 'return value of trunc() in python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
419def __trunc__(self,*args):
420 """ __trunc__(x: Int64) -> Int64 """
421 pass
210def trunc(data):
211 """Compute element-wise trunc of data.
212
213 Parameters
214 ----------
215 data : relay.Expr
216 The input data
217
218 Returns
219 -------
220 result : relay.Expr
221 The computed result.
222 """
223 return _make.trunc(data)
8@singledispatch
9def type_trunc(cast_type, val):
10 raise TypeError(
11 f"Type '{repr(cast_type)}' unsupported, cannot truncate type '{val}' "
12 f"of type '{repr(type(val))}'")
112def trunc(x):
113 return Trunc(float(x))

Related snippets