Skip to content

Commit 322f257

Browse files
committed
Auto-generated commit
1 parent 6e6d1ba commit 322f257

File tree

2 files changed

+23
-30
lines changed

2 files changed

+23
-30
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ A total of 43 issues were closed in this release:
737737

738738
<details>
739739

740+
- [`805412f`](https://github.com/stdlib-js/stdlib/commit/805412fecd7227470a7fb28606c94f00d1e7538e) - **docs:** update `ndarray/base` TypeScript declarations [(#10021)](https://github.com/stdlib-js/stdlib/pull/10021) _(by stdlib-bot)_
740741
- [`9696b4d`](https://github.com/stdlib-js/stdlib/commit/9696b4d2af500640e8fdd5f76a499248e3f2f17a) - **docs:** update namespace table of contents [(#10022)](https://github.com/stdlib-js/stdlib/pull/10022) _(by stdlib-bot)_
741742
- [`7b69002`](https://github.com/stdlib-js/stdlib/commit/7b69002e03bd424815f80e156e0994f150e80175) - **feat:** ensure support for non-string dtypes and update tests to use functional accessors _(by Athan Reines)_
742743
- [`4794f9e`](https://github.com/stdlib-js/stdlib/commit/4794f9e933b2f3375daa7d74d856dd8af79ce5ea) - **test:** use functional accessors and ensure support for non-string dtypes _(by Athan Reines)_

base/docs/types/index.d.ts

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,30 +1859,23 @@ interface Namespace {
18591859
* var typedarray = require( '@stdlib/array/typed' );
18601860
* var ndarray = require( './../../../ctor' );
18611861
* var getShape = require( './../../../shape' );
1862-
* var ndarray2array = require( './../../../to-array' );
18631862
*
1864-
* var buffer = [ 1, 2, 3, 4, 5, 6 ];
1863+
* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float64' );
18651864
* var shape = [ 3, 2 ];
18661865
* var strides = [ 2, 1 ];
18671866
* var offset = 0;
18681867
*
1869-
* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
1870-
* // returns <ndarray>
1868+
* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1869+
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
18711870
*
18721871
* var sh = getShape( x );
18731872
* // returns [ 3, 2 ]
18741873
*
1875-
* var arr = ndarray2array( x );
1876-
* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
1877-
*
18781874
* var y = ns.fliplr( x, false );
1879-
* // returns <ndarray>
1875+
* // returns <ndarray>[ [ 2.0, 1.0 ], [ 4.0, 3.0 ], [ 6.0, 5.0 ] ]
18801876
*
18811877
* sh = getShape( y );
18821878
* // returns [ 3, 2 ]
1883-
*
1884-
* arr = ndarray2array( y );
1885-
* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
18861879
*/
18871880
fliplr: typeof fliplr;
18881881

@@ -1896,37 +1889,31 @@ interface Namespace {
18961889
* @example
18971890
* var typedarray = require( '@stdlib/array/typed' );
18981891
* var ndarray = require( './../../../ctor' );
1899-
* var ndarray2array = require( './../../../to-array' );
1892+
* var getShape = require( './../../../shape' );
19001893
*
1901-
* var buffer = [ 1, 2, 3, 4, 5, 6 ];
1894+
* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float64' );
19021895
* var shape = [ 3, 2 ];
19031896
* var strides = [ 2, 1 ];
19041897
* var offset = 0;
19051898
*
1906-
* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
1907-
* // returns <ndarray>
1899+
* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1900+
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
19081901
*
1909-
* var sh = x.shape;
1902+
* var sh = getShape( x );
19101903
* // returns [ 3, 2 ]
19111904
*
1912-
* var arr = ndarray2array( x );
1913-
* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
1914-
*
19151905
* var y = ns.flipud( x, false );
1916-
* // returns <ndarray>
1906+
* // returns <ndarray>[ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ]
19171907
*
1918-
* sh = y.shape;
1908+
* sh = getShape( y );
19191909
* // returns [ 3, 2 ]
1920-
*
1921-
* arr = ndarray2array( y );
1922-
* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ]
19231910
*/
19241911
flipud: typeof flipud;
19251912

19261913
/**
1927-
* Invokes a callback function once for each ndarray element.
1914+
* Invokes a callback function once for each element in an ndarray.
19281915
*
1929-
* @param arrays - array-like object containing an output ndarray
1916+
* @param arrays - array-like object containing an input ndarray
19301917
* @param fcn - callback function
19311918
* @param thisArg - callback function execution context
19321919
*
@@ -1948,7 +1935,7 @@ interface Namespace {
19481935
* // Define the index offset:
19491936
* var ox = 1;
19501937
*
1951-
* // Create the output ndarray:
1938+
* // Create the input ndarray:
19521939
* var x = ndarray( 'float64', xbuf, shape, sx, ox, 'row-major' );
19531940
*
19541941
* // Apply the callback function:
@@ -1964,12 +1951,14 @@ interface Namespace {
19641951
* @returns one-dimensional ndarray
19651952
*
19661953
* @example
1954+
* var getDType = require( './../../../dtype' );
1955+
*
19671956
* var arr = [ 1, 2, 3, 4 ];
19681957
*
19691958
* var x = ns.array2ndarray( arr, 'row-major' );
19701959
* // returns <ndarray>
19711960
*
1972-
* var dt = x.dtype;
1961+
* var dt = String( getDType( x ) );
19731962
* // returns 'generic'
19741963
*/
19751964
array2ndarray: typeof array2ndarray;
@@ -1983,13 +1972,16 @@ interface Namespace {
19831972
* @returns zero-dimensional ndarray
19841973
*
19851974
* @example
1975+
* var getShape = require( './../../../shape' );
1976+
* var getDType = require( './../../../dtype' );
1977+
*
19861978
* var x = ns.scalar2ndarray( 1.0, 'generic', 'row-major' );
19871979
* // returns <ndarray>
19881980
*
1989-
* var sh = x.shape;
1981+
* var sh = getShape( x );
19901982
* // returns []
19911983
*
1992-
* var dt = x.dtype;
1984+
* var dt = String( getDType( x ) );
19931985
* // returns 'generic'
19941986
*
19951987
* var v = x.get();

0 commit comments

Comments
 (0)