'Return True if the gradient has exactly two stops in it: black at 0.0 and white at 1.0.'

def isMapTrivial(self):

    if (len(self.pos) != 2):
        return False
    if ((self.pos[0] != 0.0) or (self.pos[1] != 1.0)):
        return False
    if (self.color.dtype.kind == 'f'):
        return np.all((self.color == np.array([[0.0, 0.0, 0.0, 1.0], [1.0, 1.0, 1.0, 1.0]])))
    else:
        return np.all((self.color == np.array([[0, 0, 0, 255], [255, 255, 255, 255]])))
