-
-
Notifications
You must be signed in to change notification settings - Fork 0
[RFC]: add ndarray/base/tile #253
Copy link
Copy link
Open
stdlib-js/stdlib
#11499Labels
FeatureTask to add a new feature.Task to add a new feature.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.estimate: 2-4hrsTask which should take between 2 to 4 hours.Task which should take between 2 to 4 hours.priority: HighHigh priority concern or feature request.High priority concern or feature request.🤖 AIAllowed to use AI.Allowed to use AI.
Metadata
Metadata
Assignees
Labels
FeatureTask to add a new feature.Task to add a new feature.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.estimate: 2-4hrsTask which should take between 2 to 4 hours.Task which should take between 2 to 4 hours.priority: HighHigh priority concern or feature request.High priority concern or feature request.🤖 AIAllowed to use AI.Allowed to use AI.
Construct a new ndarray by repeating the elements of an input ndarray a specified number of times along each dimension.
API:
Parameters:
x— input ndarrayreps— array of repetitions for each dimensionDesign constraints:
repsmust have at leastndims(x)elements.reps.length > ndims(x), treatxas if singleton dimensions were prepended (without actually creating a new ndarray).Rationale for requiring
reps.length >= ndims(x):In NumPy,
repscan have fewer elements thanndims(x), which makes it impossible to infer the output rank from the call site alone. By requiringreps.length >= ndims(x), the output rank is always equal toreps.length, making code easier to reason about.Related:
numpy.tilerepmat