Added missing warnings import

There is a warnings call around line 758, but as warnings is not imported, this fails.