About stdlib...
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Concatenate a list of one-dimensional or two-dimensional ndarrays as rows.
import rowcat from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-rowcat@deno/mod.js';You can also import the following named exports from the package:
import { assign } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-rowcat@deno/mod.js';Concatenates a list of one-dimensional or two-dimensional ndarrays as rows.
import array from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-array@deno/mod.js';
var x = array( [ 1.0, 2.0, 3.0 ] );
// returns <ndarray>[ 1.0, 2.0, 3.0 ]
var y = array( [ [ 4.0, 5.0, 6.0 ], [ 7.0, 8.0, 9.0 ] ] );
// returns <ndarray>[ [ 4.0, 5.0, 6.0 ], [ 7.0, 8.0, 9.0 ] ]
var out = rowcat( [ x, y ] );
// returns <ndarray>[ [ 1.0, 2.0, 3.0 ], [ 4.0, 5.0, 6.0 ], [ 7.0, 8.0, 9.0 ] ]The function accepts the following arguments:
- arrays: a list of input ndarrays. The data type of the output ndarray is determined by applying type promotion rules to the list of input ndarrays. If provided ndarrays having different memory layouts, the output ndarray has the default order.
Concatenates a list of one-dimensional or two-dimensional ndarrays as rows and assigns results to a provided output ndarray.
import array from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-array@deno/mod.js';
import zeros from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-zeros@deno/mod.js';
var x = array( [ 1.0, 2.0, 3.0 ] );
// returns <ndarray>[ 1.0, 2.0, 3.0 ]
var y = array( [ [ 4.0, 5.0, 6.0 ], [ 7.0, 8.0, 9.0 ] ] );
// returns <ndarray>[ [ 4.0, 5.0, 6.0 ], [ 7.0, 8.0, 9.0 ] ]
var z = zeros( [ 3, 3 ] );
// returns <ndarray>[ [ 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 0.0 ] ]
var out = rowcat.assign( [ x, y ], z );
// returns <ndarray>[ [ 1.0, 2.0, 3.0 ], [ 4.0, 5.0, 6.0 ], [ 7.0, 8.0, 9.0 ] ]
var bool = ( out === z );
// returns trueThe function accepts the following arguments:
import discreteUniform from 'https://cdn.jsdelivr.net/gh/stdlib-js/random-discrete-uniform@deno/mod.js';
import ndarray2array from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-to-array@deno/mod.js';
import rowcat from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-rowcat@deno/mod.js';
var x = discreteUniform( [ 3 ], 0, 10, {
'dtype': 'generic'
});
console.log( ndarray2array( x ) );
var y = discreteUniform( [ 2, 3 ], 0, 10, {
'dtype': 'generic'
});
console.log( ndarray2array( y ) );
var out = rowcat( [ x, y ] );
console.log( ndarray2array( out ) );This package is part of stdlib, a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2026. The Stdlib Authors.