Closed
Description
Description
This RFC proposes adding a package to return an array having uninitialized memory.
The API should be similar to @stdlib/array/ones
.
For non-generic dtypes, we can use @stdlib/buffer/alloc-unsafe
and the reinterpret the underlying ArrayBuffer
. If Buffer
is not a Uint8Array
(i.e., Node.js <3.0.0), we should use @stdlib/array/zeros
. The Uint8Array
check can be part of a polyfill.
In browser environments, memory should be zero-filled, as returning uninitialized memory is not possible.
For generic dtype, we should return a zero-filled array.
Related Issues
None.
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:
.