src/local.js
function addBias(arr) {
  if (!Array.isArray(arr) || !arr.length) {
    throw new Error(`Expected ${arr} to be an array with length`);
  } else if (!arr.every(Array.isArray)) {
    throw new Error(`Expected every item of ${arr} to be an array`);
  }

  return arr.map(row => [1].concat(row));
}
function addBias(arr) {
  if (!Array.isArray(arr) || !arr.length) {
    throw new Error(`Expected ${arr} to be an array with length`);
  } else if (!arr.every(Array.isArray)) {
    throw new Error(`Expected every item of ${arr} to be an array`);
  }

  return arr.map(row => [1].concat(row));
}
function addBias ( arr ) { if ( ! Array . isArray ( arr ) || ! arr . length ) { throw new Error ( ` ${ arr } ` ) ; } else if ( ! arr . every ( Array . isArray ) ) { throw new Error ( ` ${ arr } ` ) ; } return arr . map ( row => [ 1 ] . concat ( row ) ) ; }
Add bias.

@param {?} A
@returns {Array}
Add bias .