Shoudn't that be  `mx = np.maximum(self.dtype.type(0), mx)`?