I am getting the following exception while running the code. I have same size of all the Landsat (size 20.5 MB) and MODIS (size 5.1 MB) Images. I am running the code with python 3.6.7 on Mac (10.14.5 Intel Iris Graphics 6100 1536 MB)
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
2.17085 2.34144 Abort trap: 6