Skip to content

Slices and views with asContiguous copies the whole parent tensor data #121

@edubart

Description

@edubart
import arraymancer

let a = ones[int](1000,2)
let b = a[0,_]
echo b.data.len

let c = a.unsafeSlice(0,_).asContiguous()
echo c.data.len

Outputs:

2000
2000

This is because of the deep seq copy, this is causing slowdown in axis iterators (used by reduce) and anywhere copying slices.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions