build/modelscript.umd.js
function pivotArrays(arrays = []) {
              return (arrays.length)
                ? arrays[ 0 ].map((vectorItem, index) => {
                  const returnArray = [];
                  arrays.forEach((v, i) => {
                    returnArray.push(arrays[ i ][ index ]);
                  });
                  return returnArray;
                })
                : arrays;
            }
function pivotArrays(arrays = []) {
              return (arrays.length)
                ? arrays[ 0 ].map((vectorItem, index) => {
                  const returnArray = [];
                  arrays.forEach((v, i) => {
                    returnArray.push(arrays[ i ][ index ]);
                  });
                  return returnArray;
                })
                : arrays;
            }
function pivotArrays ( arrays = [ ] ) { return ( arrays . length ) ? arrays [ 0 ] . map ( ( vectorItem , index ) => { const returnArray = [ ] ; arrays . forEach ( ( v , i ) => { returnArray . push ( arrays [ i ] [ index ] ) ; } ) ; return returnArray ; } ) : arrays ; }
returns a matrix of values by combining arrays into a matrix
@memberOf util
@example
const arrays = [
[ 1, 1, 3, 3 ],
[ 2, 2, 3, 3 ],
[ 3, 3, 4, 3 ],
];
pivotArrays(arrays); //=>
[
[1, 2, 3,],
[1, 2, 3,],
[3, 3, 4,],
[3, 3, 3,],
];
@param {Array} [vectors=[]] - array of arguments for columnArray to merge columns into a matrix
@returns {Array} a matrix of column values
returns a matrix of values by combining arrays into a matrix