We consider the hydrodynamic flow of an electron fluid in a channel formed in a two-dimensional electron gas (2DEG) with no-slip boundary conditions. To generate vorticity in the fluid the flow is influenced by an array of micromagnets on the top of 2DEG. We analyse the viscous boundary layer and demonstrate anti-Poiseuille behaviour in this region. Furthermore we predict a longitudinal Hall effect, where a periodic magnetic field generates a voltage modulation in the direction of transport. From the experimental point of view we propose a method for a precise measurements of the properties of different electron fluids. The results are applicable to graphene away from the charge neutrality point and to semiconductors.