cropCentralSquare = (arr) => {
  let width = arr.length;
  let height = arr[0].length;
  let croppedArray;

  // Crop largest square from image if the image is smaller than 64x64 and pad the
  // cropped image.
  if (width < networkInputSize || height < networkInputSize) {
    // TODO(robert): Finish the padding logic.  Pushing now for Omar to work on when he is ready.
    let cropDimensions = Math.min(width, height);
    let startXIdx = Math.floor(width / 2) - (cropDimensions / 2);
    let startYIdx = Math.floor(height / 2) - (cropDimensions / 2);
    let unpaddedSubarray = arr.slice(startXIdx, startXIdx + cropDimensions).map(i => i.slice(startYIdx, startYIdx + cropDimensions));
  } else {
    let startXIdx = Math.floor(width / 2) - Math.floor(networkInputSize / 2);
    let startYIdx = Math.floor(height / 2) - Math.floor(networkInputSize / 2);
    croppedArray = arr.slice(startXIdx, startXIdx + networkInputSize).map(i => i.slice(startYIdx, startYIdx + networkInputSize));
  }
  return croppedArray;
}
Crop the largest central square of size 64x64x3 of a 3d array.

@param {[int8]} arr array that requires cropping and padding (if a 64x64 crop
is not present)
@returns 64x64x3 array