{ } Raw JSON

bundles / numpy 2.4.4 / numpy / polynomial / polyutils / _as_int

function

numpy.polynomial.polyutils:_as_int

source: /numpy/polynomial/polyutils.py :703

Signature

def   _as_int ( x desc )

Summary

Like operator.index, but emits a custom exception when passed an incorrect type

Parameters

x : int-like

Value to interpret as an integer

desc : str

description to include in any error message

Raises

TypeError : if x is a float or non-numeric

Aliases

  • numpy.polynomial.polyutils._as_int