Python numpy subtraction no negative numbers (4-6 gives 254)
I wish to subtract 2 gray human faces from each other to see the difference, but I encounter a problem that subtracting e.g. [4] - [6] gives [254] instead of [-2] (or difference: [2]). print(type(face)) #<type 'numpy.ndarray'> print(face.shape) #(270, 270) print(type(nface)) #<type 'numpy.ndarray'> print(nface.shape) #(270, 270) #This is what I want to do: sface = face - self.nface #or sface = np.subtract(face, self.nface) Both don't give negative numbers but instead subtract the rest after 0 from 255. Output example of sface: [[ 8 255 8 ..., 0 252 3] [ 24 18 14 ..., 255 254 254] [ 12 12 12 ..