Skip to content

Document reason for strongly typed Axis? #564

Closed
@JP-Ellis

Description

@JP-Ellis

While using ndarray, I was wondering why certain methods use the Axis type instead of just usize, especially given that Axis is just a simple wrapper around usize. I tried looking into the documentation, and could not find any explanation; and searching through past issues/pull requests, I found just #91, #96 and #97 (though none of them given a clear reason why this is the case).

Would it be worth documenting this choice?

And is there a reason why From<usize>/Into<Axis> isn't implemented for Axis/usize?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions