I cannot tell whether the original code worked before, but this explicit typecasting is necessary now.
The issue occurs, for example if attempting to execute "PieChart.py" or "ScaledBitmap2Demo.py" in "samples\floatcanvas". Without typecasting, type errors are thrown, such as "TypeError: Image.Scale(): argument 1 has unexpected type 'numpy.float64'".
Apparently, this problem might be due to recent updates in Python and NumPy.
The ArtProvider shouldn't be cloned in this case because SetArtProvider() does
not take ownership of the object in this case. Because of that, once the
cloned provider goes out of scope and gets garbage collected, future uses will
crash.
Fixes#141.