This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / _lib / _util / _validate_int

function

scipy._lib._util:_validate_int

source: build-install/usr/lib/python3.14/site-packages/scipy/_lib/_util.py:419

Signature

def _validate_int(k, name, minimum = None, maximum = None)

Summary

Validate a scalar integer.

Extended Summary

This function can be used to validate an argument to a function that expects the value to be an integer. It uses operator.index to validate the value (so, for example, k=2.0 results in a TypeError).

Parameters

k : int

The value to be validated.

name : str

The name of the parameter.

minimum : int, optional

An optional lower bound.

maximum : int, optional

An optional upper bound.

Aliases

  • scipy.signal._whittaker._validate_int