A downhole rotating machine includes a stator having stator windings and corresponding magnetic flux guides and a rotor having a plurality of magnets configured to cooperate with the stator windings and the corresponding magnetic flux guides to generate a magnetic field in a magnetic gap that is substantially parallel to an axis of rotation of the rotor, wherein the magnetic gap provides a magnetic gap separation between the plurality of magnets and the corresponding magnetic flux guides that is at least five percent of an overall diameter of the downhole rotating machine. A method of operating a downhole tool in a wellbore and a downhole tool are also provided.