[python3] Fix HDF5 scalar conversion