Section 333 read with Section 334 Cr.P.C. provides for acquittal where the court is satisfied from evidence that the accused was, at the time of the offence, incapable of knowing the nature of the act or that it was wrong or contrary to law due to unsoundness of mind.
Dimple @ Dimpu @ Gurcharan v. State of Punjab2008 Cassie (P&H HC) 1764para 17