Skip to content

compute dims

kgryte edited this page May 12, 2015 · 1 revision

Computes array dimensions, including nested arrays.

var data, d;

data = [ 1, 2 ];
d = compute.dims( data );
// returns [2]

data = [ [1,2], [1,2] ];
d = compute.dims( data );
// returns [2,2]

To limit the number of dimensions returned, set the max option.

Clone this wiki locally