Import numpy only in function where it is used