sever#
Detach a view from its parent, keeping the values it has right now.
my $view = $big->slice(‘0:9’); $view->sever; # now an ndarray in its own right
Returns the ndarray. A slice or other view normally shares its parent’s data; after sever it owns a copy of the elements it was showing, and neither side sees the other’s writes. Useful when you want to keep a small window and let a large parent be freed.
Severing an ndarray that has no parent does nothing.