Skip to content

Commit 626f31e

Browse files
authored
feat!: update ndarray/base TypeScript declarations
This PR adds a new mandatory parameter to the exported symbol for `spreadDimensions`. BREAKING CHANGE: add `writable` parameter To migrate, users should be explicit in terms of whether a writable or read-only ndarray is returned. The previous behavior only returned a read-only array when provided a read-only array. The responsibility for determining the appropriate return value behavior is now pushed to userland. PR-URL: #9386 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 16eee82 commit 626f31e

File tree

1 file changed

+2
-1
lines changed
  • lib/node_modules/@stdlib/ndarray/base/docs/types

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/docs/types/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3870,6 +3870,7 @@ interface Namespace {
38703870
* @param ndims - number of dimensions in the output array
38713871
* @param x - input array
38723872
* @param dims - dimension indices
3873+
* @param writable - boolean indicating whether a returned array should be writable
38733874
* @returns output array
38743875
*
38753876
* @example
@@ -3881,7 +3882,7 @@ interface Namespace {
38813882
* var shx = x.shape;
38823883
* // returns [ 2, 2 ]
38833884
*
3884-
* var y = ns.spreadDimensions( 5, x, [ 1, 3 ] );
3885+
* var y = ns.spreadDimensions( 5, x, [ 1, 3 ], false );
38853886
* // returns <ndarray>
38863887
*
38873888
* var shy = y.shape;

0 commit comments

Comments
 (0)