How anisotropic particles rotate and orient in a flow depends on the hydrodynamic torque they experience. Here we compute the torque acting on a small spheroid in a uniform flow by numerically solving the Navier-Stokes equations. Particle shape is varied from oblate (aspect ratio $lambda = 1/6$) to prolate ($lambda = 6$), and we consider low and moderate particle Reynolds numbers (${rm Re} le 50$). We demonstrate that the angular dependence of the torque, predicted theoretically for small particle Reynolds numbers remains qualitatively correct for Reynolds numbers up to ${rm Re} sim 10$. The amplitude of the torque, however, is smaller than the theoretical prediction, the more so as ${rm Re}$ increases. For Re larger than $10$, the flow past oblate spheroids acquires a more complicated structure, resulting in systematic deviations from the theoretical predictions. Overall, our numerical results provide a justification of recent theories for the orientation statistics of ice-crystals settling in a turbulent flow.