you should pass new.ravel().astype(int) and old.ravel().astype(int)
and make sure to use a package made from the current release of OpenCV, which is v4.7.0 right now. if you recently installed with pip install opencv-python, that is the case.
you need to understand that the Geeks-for-Geeks site contains poor quality articles. that is one of them. they never seem to have executed their code. what they present there shouldn’t have worked at all. the circle() call wants integers but it’s probably getting floats. in past versions of OpenCV, the Python bindings even complained if they were given numpy integers but that’s okay now.