Skip to content

rectangular0

Generates a rectangular window of the given size with 0% overlap.

Parameters:

Name Type Description Default
segment_size int

Size of the window to be created.

required
dtype dtype

The desired datatype of the window

float32

Returns:

Type Description
Tuple[NDArray[Any], int]

A rectangular window with 0% overlap

Source code in src/libsegmenter/windows/rectangular.py
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
def rectangular0(
    segment_size: int, dtype: DTypeLike = np.float32
) -> Tuple[NDArray[Any], int]:
    """
    Generates a rectangular window of the given size with 0% overlap.

    Args:
        segment_size (int): Size of the window to be created.
        dtype (np.dtype): The desired datatype of the window

    Returns:
        A rectangular window with 0% overlap

    """
    return _rectangular(segment_size, dtype=dtype), segment_size