When Ariza signed the first time around. http://www.nba.com/rockets/news/TMac_Number_Change-319062-34.html
Wikipedia is memory: In 2009, McGrady changed his jersey number to #3. He made the switch to promote his humanitarian efforts in the Darfur region of the Sudan and a documentary on his summer 2007 visits to refugee camps in the region. The documentary is called 3 Points.[75] However, he went back to wearing # 1 when he joined the Detroit Pistons.