You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
kgryte
added
RFC
Request for comments. Feature requests and proposed changes.
Feature
Issue or pull request for adding a new feature.
labels
Mar 24, 2023
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 underlyingArrayBuffer
. IfBuffer
is not aUint8Array
(i.e., Node.js <3.0.0), we should use@stdlib/array/zeros
. TheUint8Array
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
RFC:
.The text was updated successfully, but these errors were encountered: