Lt. Jorge Duran said the shooting occurred shortly after midnight, the Los Angeles Times reported. Police released no information about the woman.
Her sons, ages 9 and 15, were taken to a hospital. Investigators said the younger boy was stabbed and the teenager was hit.
The woman also allegedly attacked her boyfriend.
Duran said officers who responded to a report of a disturbance found the woman outside her house in the Bay Terraces neighborhood threatening two men with a large kitchen knife. Duran said she was ordered to drop the knife but instead ran towards the officers holding it over her head.