Answers for "python change 1 to 0"

1

change range to 0 to 0 to 1 python

import numpy as np

def NormalizeData(data):
    return (data - np.min(data)) / (np.max(data) - np.min(data))
Posted by: Guest on January-26-2021
0

python cast number to between 0 and 1

NewValue = (((OldValue - OldMin) * (NewMax - NewMin)) / (OldMax - OldMin)) + NewMin
Posted by: Guest on July-06-2020

Python Answers by Framework

Browse Popular Code Answers by Language