catch_warnings() doesn't take a class argument, but simplefilter() does. I'll give that a try.