Safe scipy import for target_format.py

Fixes #1038
Okay, fixed!