Skip to content

Document astype functionality in ndarray #1124

Closed
@sgasse

Description

@sgasse
Contributor

Hi! I took a stab at Document ndarray's equivalent to NumPy's astype from #597 in this PR:
#1123

Here are a few questions:

  • Which other conversion examples would you like to see?
  • How can I locally build / access the ndarray_for_numpy_users documentation to see how my changes look like? I cannot find the page when running cargo doc --open.
  • Should there be more details on differences in conversion that stem from Rust's type system and are not specific to ndarray? (e.g. np.astype() does not saturate, a.mapv(|x| x as u8 runs a saturated conversion)

Activity

adamreichold

adamreichold commented on Nov 29, 2021

@adamreichold
Collaborator

How can I locally build / access the ndarray_for_numpy_users documentation to see how my changes look like? I cannot find the page when running cargo doc --open.

I think you just need to enable the docs feature, i.e. run

> cargo doc --features docs --open
sgasse

sgasse commented on Nov 30, 2021

@sgasse
ContributorAuthor

Thank you @adamreichold , that worked 🙏

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

        Participants

        @adamreichold@sgasse

        Issue actions

          Document `astype` functionality in ndarray · Issue #1124 · rust-ndarray/ndarray