use conditions and numpy differenly