Solved by ptrblck in post #6 
              
              
                This should be caused by dividing by zero, if the max and min values are equal. 
I naively implemented sklearn’s approach without checks. 
Add this check to your implementation: 
class PyTMinMaxScalerVectorized(object):
    """
    Transforms each channel to the range [0, 1].
    """
    def __call_…