Moved solution to numpy