Skip to content

Add py::array::size() function? #34

Closed
@adler-j

Description

@adler-j

Currently if I want to access a parameter such as array length, the best method to my knowledge is

size_t size = target.request().count;

There are two problems with this. First, the corresponding python name is size, so renaming count -> size would be nice.

Further, wouldnt It be nice to have access to this as a free function?

size_t size = target.size()

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