Skip to content

randnlike(A), randlike(A) similar to pytorch #52647

Open
@isentropic

Description

@isentropic

Not sure if this is new thing or not but the only relevant disc. so far is here
Why don't we have randnlike(A), randlike(A) https://pytorch.org/docs/stable/generated/torch.randn_like.html
Very convenient for ML.

rand(size(A)) doesn't cut it as it doesn't propagate types. The equivalent would be, rand(eltype(A), size(A)) which is a little verbose

Metadata

Metadata

Assignees

No one assigned

    Labels

    randomnessRandom number generation and the Random stdlib

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions