Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Wrong index with 3dim array when 1 dim size is 1 #319

Description

@jdavid
(Pdb) p arr
<blosc2.lazyexpr.LazyExpr object at 0x7fd224d12600>
(Pdb) p arr[:]
array([[[16., 16., 16., ..., 16., 16., 16.]],

       [[16., 16., 16., ..., 16., 16., 16.]],

       [[16., 16., 16., ..., 16., 16., 16.]],

       ...,

       [[16., 16., 16., ..., 16., 16., 16.]],

       [[16., 16., 16., ..., 16., 16., 16.]],

       [[16., 16., 16., ..., 16., 16., 16.]]])

# With numpy indexing
(Pdb) p arr[:][0]
array([[16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16.,
        16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16.,
        16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16.,
        16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16.,
        16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16.,
        16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16.,
        16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16., 16.,
        16., 16., 16., 16., 16., 16., 16., 16., 16.]])

# With blosc2 indexing
(Pdb) p arr[0]
array([[[16., 16., 16., ..., 16., 16., 16.]],

       [[16., 16., 16., ..., 16., 16., 16.]],

       [[16., 16., 16., ..., 16., 16., 16.]],

       ...,

       [[16., 16., 16., ..., 16., 16., 16.]],

       [[16., 16., 16., ..., 16., 16., 16.]],

       [[16., 16., 16., ..., 16., 16., 16.]]])

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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