Skip to content

Way to get a range of sub-arrays similar to numpy's x[a:b] #218

Open
@jneen

Description

@jneen

Hey there! Thanks for this software.

I'm attempting to do some audio processing, which involves a lot of splitting a big 2d array into smaller chunks. My wave is of shape [big_number, 2], for 2-channel stereo audio, and I'm attempting to slice this to get a time range. I would expect, for example, wave[0...1024] to result in an array of shape [1024, 2], but it seems to treat the whole thing as flat and just return an array of shape [1024].

I had a search through the docs and examples and couldn't find anything like this - is there a way to take this kind of slice or do i have to math out the size and reshape afterwards?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions