Module utils

Module utils 

Source
Expand description

Utility functions for numerical operations

This module provides common utility functions used throughout SciRS2.

Functions§

all
Checks if all elements in an iterable satisfy a predicate
any
Checks if any element in an iterable satisfies a predicate
arange
Creates a range of values with a specified step size
arange_unchecked
Convenience function that provides the old behavior (panics on error)
arrays_equal
Compare arrays within a tolerance
differentiate
Differentiate a function using central difference method.
fill_diagonal
Fills the diagonal of a matrix with a value
generate_window
Create window functions of various types.
get_window
Get window function compatible with SciPy API
integrate
Integrate a function using composite Simpson’s rule.
is_close
Checks if two floating-point values are approximately equal
linspace
Creates a linearly spaced array between start and end (inclusive)
logspace
Creates a logarithmically spaced array between base^start and base^end (inclusive)
maximum
Compute the element-wise maximum of two arrays
minimum
Compute the element-wise minimum of two arrays
normalize
Normalize a vector to have unit energy or unit peak amplitude.
pad_array
Pad an array with values according to the specified mode.
points_equal
Check if two points are equal within a tolerance
prod
Computes the product of all elements in an iterable