I don't have any strong opinion. I want to avoid adding a new warning class if one of the standard library does the job.

> I'm happy to consider inheriting from RuntimeWarning rather than UserWarning, since it is intended for "dubious runtime behaviour". Yet we use UserWarnings everywhere else in sklearn, despite the docstring "Base class for warnings generated by user code."

`RuntimeWarning` looks appropriate (Base class for warnings about dubious runtime behavior.).