Oxidation number approximately
For complex or non stoichiometric ( many metal oxides ) compounds, it makes sense to calculate the average oxidation number that can be a rational number.
This can be useful if we are to enumerate chemical reactions with non-stoichiometric metal oxides, or if just a summary elemental composition is known, like hydrocarbon mixtures.
Oxidation numbers of particular atoms are integer numbers, with exceptions when   extra electrons ( or theirs deficit ) are shared among different number of atoms. The particular example of this are superoxides $\ce{M^{I}O2}$.