Added try-except clause to catch numpy error.
- [x] closes #27953
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

needs a test Modified as requested. by "needs a test" I meant that this PR fixes some bug and we need a unit test (goes somewhere in pandas/tests/) to test that we get the correct behavior I added a test in a place that seemed appropriate. It passed on my platform. The last version didn't pass the checks. I'm confused because the error doesn't seem to be related to anything that I edited...

![Screenshot from 2019-08-18 15-06-44](https://user-images.githubusercontent.com/43019642/63229856-8aef3d80-c1ca-11e9-96e4-b9763bc641da.png)
![Screenshot from 2019-08-18 15-05-19](https://user-images.githubusercontent.com/43019642/63229857-8b87d400-c1ca-11e9-90f3-aa8da80a0907.png) can you merge master and add a test closing this as stale, though its a nice change, needs a rebase and comments addressed.