Added imports of numpy and scipy.