function _kron(a, b) {
    // Deal with the dimensions of the matricies.
    if (size(a).length === 1) {
      // Wrap it in a 2D Matrix
      a = [a];
    }

    if (size(b).length === 1) {
      // Wrap it in a 2D Matrix
      b = [b];
    }

    if (size(a).length > 2 || size(b).length > 2) {
      throw new RangeError('Vectors with dimensions greater then 2 are not supported expected ' + '(Size x = ' + JSON.stringify(a.length) + ', y = ' + JSON.stringify(b.length) + ')');
    }

    var t = [];
    var r = [];
    return a.map(function (a) {
      return b.map(function (b) {
        r = [];
        t.push(r);
        return a.map(function (y) {
          return b.map(function (x) {
            return r.push(multiplyScalar(y, x));
          });
        });
      });
    }) && t;
  }
Calculate the kronecker product of two matrices / vectors
@param {Array} a  First vector
@param {Array} b  Second vector
@returns {Array} Returns the kronecker product of x and y
@private