It seems like the sample code for image scaling got copied pasted from image rotation, but apart from the leading comment nothing seem to be changed.
Current state: https://opencv-tutorial.readthedocs.io/en/latest/trans/transform.html#scale
Python example: https://github.com/rasql/opencv-tutorial/blob/master/docs/trans/transform3.py