Skip to content

make reshape and flatten follow clone vs in-place pattern #28

@shinzlet

Description

@shinzlet

Right now, NArray#reshape will create a new NArray that points to the same buffer data. This means that multiple NArrays can share one memory buffer, which is problematic (especially because an NArray can be extended in place, at least in theory). We should default to the pattern of reshape! and reshape that are already seen in several operations (either you clone or perform the operation in place). If using the same buffer is really desirable, the user can do narr.dup.reshape!

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