Revert "Fix #30 by importing numpy inside function"

This reverts commit db272d55e50c7a4c1617244ba8d5c40f4f6bf8cc.
See #30.