No, Margaret Cavendish did not study science formally. She was a self-taught scientist and philosopher who wrote about topics such as mathematics, physics, and biology. She is considered to be one of the first women to make significant contributions to the scientific community.
The Marvelous Mind of Margaret Cavendish:
An Engaging English Quiz on the Duchess of Newcastle-upon-Tyne