Open
Description
Description
This RFC proposes improving the TypeScript type declarations for @stdlib/ndarray/array
. Currently, type declarations do not account for dtype
information.
Ideally, we'd improve declarations such that
- based on a provided
dtype
option value, we return anndarray
of the corresponding type (e.g., ifdtype = 'float64'
, then return afloat64ndarray
, etc). - when not provided a
dtype
option value, we use thebuffer
argument/option to infer a corresponding outputndarray
dtype.
Supporting the above is likely to require extensive use of function overloads in a manner to what we've done elsewhere in the project when a dtype can effect output results.
Related Issues
No.
Questions
No.
Other
No.
Checklist
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:
.
Metadata
Metadata
Assignees
Labels
RFC feature request which has been accepted.Issue or pull request for enhancing existing functionality.Request for comments. Feature requests and proposed changes.Issue involves or relates to TypeScript.May require some initial design or R&D, but should be straightforward to resolve and/or implement.High priority concern or feature request.