Numpy converting range of angles from (-Pi, Pi) to (0, 2*Pi) : <p>This seems like it would be very straight forward but I can't seem to figure out how to map angles between -Pi and Pi to the range 0 to 2Pi.  I tried using np.select but it freezes my program for some reason.  I need the angles in this range since they will be used as training data for a neural net which can not output negative numbers.</p>

<pre><code>audio = wav.read('/home/chase/Desktop/ge.wav')[1].astype(np.float32)
audio = np.mean(audio, 1)
audio /= np.max(np.abs(audio))
audio = np.array([np.fft.rfft(audio[i:i + FRAME_SIZE]) for i in range(0, len(audio) - len(audio) % FRAME_SIZE, FRAME_SIZE)])
audio /= FRAME_SIZE
audio_mag = np.abs(audio)
audio_phase = np.angle(audio)

#this line freezes the program
audio_phase = np.select(audio_phase &lt; 0 , 2 * np.pi + audio_phase, audio_phase)
</code></pre>

<p>I need the audio </p>
