Skip to content

[RFC]: add ndarray/spread-dimensions #114

@kgryte

Description

@kgryte

ref: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/spread-dimensions

We'll want to always return a read-only array. Given how ndarray/base/spread-dimensions is implemented, we'll likely need to first create a read-only view before calling down into the base implementation, so that a read-only view is returned.

The other option would be to add a writable parameter to ndarray/base/spread-dimensions, but then we'd also need to rework remove-singleton-dimensions, expand-dimensions, and prepend-singleton-dimensions similarly. I'm open to discussion whether we should treat these APIs similar to the base "slice" APIs where we support an explicit writable parameter.

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.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions