Skip to content

PixelArray __getitem__ with single ellipsis index gives self-reference instead of new object #3963

Description

@aatle

Indexing a PixelArray with [:, :], [()], and [...] should all be the same. However, only [:, :] returns a new object, which is the intuitive and expected behavior.

Note that PixelArray slicing returns another view, with data shared by both the original and the view (the surface), so the issue is not about copying.

The one case where I found that a full view and the original array differ is that each separate object can be individually closed (once) (without affecting other views).

This is a very minor issue.

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

    PixelArraypygame.PixelArraybugNot working as intended

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions