<commit_before>
{{alias}}( shape, strides, offset, ...subscript, mode )
    Converts subscripts to a linear index.

    When provided a stride array containing negative strides, if an `offset` is
    greater than `0`, the function treats subscripts as mapping to a linear
    index in an underlying data buffer for the array, thus returning a linear
    index from the perspective of that buffer. If an `offset` is equal to `0`,
    the function treats subscripts as mapping to a linear index in an array
    view, thus returning a linear index from the perspective of that view. In
    short, from the perspective of a view, view data is always ordered.

    Parameters
    ----------
    shape: ArrayLike
        Array shape.

    strides: ArrayLike
        Stride array.

    offset: integer
        Location of the first indexed value based on the stride array.

    subscript: ...integer
        Subscripts.

    mode: string
        Specifies how to handle subscripts which exceed array dimensions. If
        equal to 'throw', the function throws an error when a subscript exceeds
        array dimensions. If equal to 'wrap', the function wraps around
        subscripts exceeding array dimensions using modulo arithmetic. If equal
        to 'clamp', the function sets subscripts exceeding array dimensions to
        either `0` (minimum index) or the maximum index along a particular
        dimension.

    Returns
    -------
    idx: integer
        Linear index.

    Examples
    --------
    > var shape = [ 3, 3, 3 ];
    > var strides = [ 9, 3, 1 ];
    > var offset = 0;
    > var idx = {{alias}}( shape, strides, offset, 1, 2, 2, 'throw' )
    17

    See Also
    --------
<commit_msg>Rename variables<commit_after>
{{alias}}( shape, strides, offset, ...subscript, mode )
    Converts subscripts to a linear index.

    When provided a stride array containing negative strides, if an `offset` is
    greater than `0`, the function treats subscripts as mapping to a linear
    index in an underlying data buffer for the array, thus returning a linear
    index from the perspective of that buffer. If an `offset` is equal to `0`,
    the function treats subscripts as mapping to a linear index in an array
    view, thus returning a linear index from the perspective of that view. In
    short, from the perspective of a view, view data is always ordered.

    Parameters
    ----------
    shape: ArrayLike
        Array shape.

    strides: ArrayLike
        Stride array.

    offset: integer
        Location of the first indexed value based on the stride array.

    subscript: ...integer
        Subscripts.

    mode: string
        Specifies how to handle subscripts which exceed array dimensions. If
        equal to 'throw', the function throws an error when a subscript exceeds
        array dimensions. If equal to 'wrap', the function wraps around
        subscripts exceeding array dimensions using modulo arithmetic. If equal
        to 'clamp', the function sets subscripts exceeding array dimensions to
        either `0` (minimum index) or the maximum index along a particular
        dimension.

    Returns
    -------
    idx: integer
        Linear index.

    Examples
    --------
    > var d = [ 3, 3, 3 ];
    > var s = [ 9, 3, 1 ];
    > var o = 0;
    > var idx = {{alias}}( d, s, o, 1, 2, 2, 'throw' )
    17

    See Also
    --------

{'fraction_non_alphanumeric': 0.07799113737075332, 'fraction_numerical': 0.008862629246676515, 'mean_word_length': 2.3326771653543306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4626945', 'n_tokens_mistral': 891, 'n_tokens_neox': 824, 'n_words': 449}