Skip to content

Using numpy.lib.strides_tricks #1

@cgaltran

Description

@cgaltran

when executed the given example, it gives following output:

>>> from numpy.lib.stride_tricks import as_strided
>>> a = np.arange(10)
>>> a
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>>
>>> windows = as_strided(a, shape=(6, 3), strides=(8, 8))
>>> windows
array([[         0,          2,          4],
       [         2,          4,          6],
       [         4,          6,          8],
       [         6,          8, 1464246683],
       [         8, 1464246683,    6881399],
       [1464246683,    6881399,    7274608]])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions