Skip to content

[RFC]: add ndarray/base/full-by #250

@kgryte

Description

@kgryte

This package should be similar to ndarray/base/fill-by, except it is a creation API and should not pass an array element to a provided callback.

API signature:

fullBy( dtype, shape, order, clbk[, thisArg] )

The callback function should be provided the following arguments:

  • indices: current array element indices

In which case, the implementation should be roughly

  • Allocate a "base" empty ndarray.
  • Define a wrapper function which wraps a provided callback so that only indices are passed to the provided callback.
  • Call ndarray/base/map, as done in ndarray/base/fill-by with map( [ x, x ], wrapper, thisArg ).
  • Return the allocated ndarray.

Metadata

Metadata

Assignees

Labels

FeatureTask to add a new feature.difficulty: 1Low degree of difficulty. Should be straightforward to implement and/or resolve.estimate: 2-4hrsTask which should take between 2 to 4 hours.🤖 AIAllowed to use AI.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions