bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _external / array_api_extra / testing / assert_less
function
scipy._external.array_api_extra.testing:assert_less
source: build-install/usr/lib/python3.14/site-packages/scipy/_external/array_api_extra/testing.py:894
Signature
def assert_less(x: Array, y: Array, *, err_msg: str = '', verbose: bool = True, check_dtype: bool = True, check_shape: bool = True, check_scalar: bool = False, check_device: bool = True, xp: ArrayNamespace | None = None) → NoneSummary
Check that two arrays are ordered by less than.
Extended Summary
This is an interface to numpy.testing.assert_array_less which accepts any standard-compatible array and performs additional array namespace, shape, and dtype checks.
Parameters
x, y: ArrayArray to compare according to
x < y(elementwise).err_msg: str, optionalError message to display on failure.
verbose: bool, default: TrueWhether to include the conflicting arrays in the error message on failure.
check_dtype: bool, default: TrueWhether to check agreement between the dtypes of
xandy.check_shape: bool, default: TrueWhether to check agreement between the shapes of
xandy.check_scalar: bool, default: FalseNumPy only: whether to check agreement between actual and desired types — 0-D numpy.ndarray vs scalar (e.g. numpy.double).
check_device: bool, default: TrueWhether to check agreement between actual and desired devices.
xp: array_namespace, optionalA standard-compatible namespace which
xandymust match.
Raises
: AssertionErrorIf
xis not strictly smaller thany, elementwise.: ImportErrorIf numpy is not importable in the Python environment.
See also
- assert_close
Similar function for inexact equality checks.
- numpy.testing.assert_array_less
Similar function for NumPy arrays.
Aliases
scipy.differentiate.xpx.testing.assert_less