Skip to content

[RFC]: add ndarray/base/to-unflattened #179

@kgryte

Description

@kgryte

This API is similar to https://docs.pytorch.org/docs/stable/generated/torch.unflatten.html, but instead of returning a view, we return a full copy to contiguous memory.

API signature:

function toUnflattened( x, dim, sizes )

The returned array should be a new array (e.g., use ndarray/base/empty-like to allocate before calling ndarray/base/assign). One will need to take care to properly compute the strides of the unflattened dimensions.

Metadata

Metadata

Assignees

Labels

FeatureTask to add a new feature.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions