function equal (array1, array2) {
  return NdArray.new(array1).equal(array2);
}
Return true if two arrays have the same shape and elements, false otherwise.
@param {(Array|NdArray)} array1
@param {(Array|NdArray)} array2
@returns {boolean}