Fix numpy version. Add original python code from posted question.