convenience-methods

How to normalize a NumPy array to within a certain range?

How to normalize a NumPy array to within a certain range? Question: After doing some processing on an audio or image array, it needs to be normalized within a range before it can be written back to a file. This can be done like so: # Normalize audio channels to between -1.0 and +1.0 audio[:,0] …

Total answers: 8