There are two reasons the drainage basins are different, as far as I can tell:
A subset will create separations between drainage basins at the boundaries where the connecting nodes are outside the cropped image. This makes sense if you think about drawing a rectangle on a drainage map.
We can see this phenomenon by subsetting a DEM in Matlab:
Zooming in on the area we subsetted, and the "original" drainage basin separations:
Drainage Basins from a subsetted rectangle:
This is a problem that can be avoided by not subsetting too much.
Python's flow direction algorithm still does not connect drainage networks over long distances.
Matlab's flow direction algorithm, even at very coarse resolutionm, produces stream networks that are long and continuous, while Python produces stream networks that are not continuous.
Because of this, python produces many more drainage basins than Matlab:
Python:
There are two reasons the drainage basins are different, as far as I can tell:
We can see this phenomenon by subsetting a DEM in Matlab: Zooming in on the area we subsetted, and the "original" drainage basin separations:
Drainage Basins from a subsetted rectangle:
This is a problem that can be avoided by not subsetting too much.
Because of this, python produces many more drainage basins than Matlab: Python:
Matlab: