Rotary piston machine which operates as a pump, compressor, motor or generator, - comprising a first rotor and a second rotor, wherein the first rotor is arranged opposite the second rotor, - wherein the first rotor has a first end face with a first tooth system, wherein the second rotor has a second end face with a second tooth system, and wherein the first tooth system and the second tooth system are each formed from at least one tooth (12, 18), - wherein the tooth systems (10, 16) engage with one another in such a way that working spaces are formed by way of the teeth of the first tooth system and the teeth of the second tooth system meshing, wherein volumes which are formed by the working spaces are changed by way of the meshing of the teeth (12, 18), - wherein the rotors (4, 6) are accommodated by a housing with an inner wall, wherein the inner wall is modelled largely on an outer contour of the rotors (4, 6), - wherein the first rotor has a first rotation axis, wherein the second rotor has a second rotation axis, wherein the first rotation axis and the second rotation axis enclose an angle (φ) which is not equal to 0°, characterized in that - at least one first magnet with a permanent magnetic field extends in the direction of a first axis of extent, wherein the at least one first magnet has a first end which is designed as a south pole and a second end which is designed as a north pole and is situated opposite the first end, wherein the at least one first magnet is arranged on the first rotor or the second rotor, wherein the first axis of extent touches a circular line with a midpoint and a diameter, wherein the circular line delimits a circular surface area, wherein the midpoint is situated on the respective rotation axis (I, II), wherein the circular surface area is substantially perpendicular to the respective rotation axis (I, II), wherein the diameter is greater than zero, - the housing has at least one electrically controllable coil which is arranged substantially radially with respect to the rotation axes (I, II), wherein the at least one coil is fixedly connected to the housing, - during operation the at least one electrically controllable coil interacts with the at least one first magnet in such a way that the rotor (4, 6) rotates. - comprising a first rotor and a second rotor, wherein the first rotor is arranged opposite the second rotor, - wherein the first rotor has a first end face with a first tooth system, wherein the second rotor has a second end face with a second tooth system, and wherein the first tooth system and the second tooth system are each formed from at least one tooth (12, 18), - wherein the tooth systems (10, 16) engage with one another in such a way that working spaces are formed by way of the teeth of the first tooth system and the teeth of the second tooth system meshing, wherein volumes which are formed by the working spaces are changed by way of the meshing of the teeth (12, 18), - wherein the rotors (4, 6) are accommodated by a housing with an inner wall, wherein the inner wall is modelled largely on an outer contour of the rotors (4, 6), - wherein the first rotor has a first rotation axis, wherein the second rotor has a second rotation axis, wherein the first rotation axis and the second rotation axis enclose an angle (φ) which is not equal to 0°, characterized in that - at least one first magnet with a permanent magnetic field extends in the direction of a first axis of extent, wherein the at least one first magnet has a first end which is designed as a south pole and a second end which is designed as a north pole and is situated opposite the first end, wherein the at least one first magnet is arranged on the first rotor or the second rotor, wherein the first axis of extent touches a circular line with a midpoint and a diameter, wherein the circular line delimits a circular surface area, wherein the midpoint is situated on the respective rotation axis (I, II), wherein the circular surface area is substantially perpendicular to the respective rotation axis (I, II), wherein the diameter is greater than zero, - the housing has at least one electrically controllable coil which is arranged substantially radially with respect to the rotation axes (I, II), wherein the at least one coil is fixedly connected to the housing, - during operation the at least one electrically controllable coil interacts with the at least one first magnet in such a way that the rotor (4, 6) rotates.