def __init__(self, RGB1, RGB2, numColors = 33., divide = 255.,
                  method = "moreland", filename = ""):

        # create a class variable for the number of colors
        self.numColors = numColors

        # assert an odd number of points
        assert np.mod(numColors,2) == 1, \
            "For diverging colormaps odd numbers of colors are desireable!"

        # assert a known method was specified
        knownMethods = ["moreland", "lab"]
        assert knownMethods in method, "Unknown method was specified!"

        if method == knownMethods[0]:
            #generate the Msh diverging colormap
            self.colorMap = self.generateColorMap(RGB1, RGB2, divide)
        elif method == knownMethods[1]:
            # generate the Lab diverging colormap
            self.colorMap = self.generateColorMapLab(RGB1, RGB2, divide)

        # print out the colormap of save it to file named filename
        if filename == "":
            for c in self.colorMap:
                    pass
                    # print "{0}, {1}, {2}".format(c[0], c[1], c[2])
        else:
            with open(filename, "w") as f:
                for c in self.colorMap:
                    f.write("{0}, {1}, {2}\n".format(c[0], c[1], c[2]))
    #-
dataset/ETHPy150Open ethankruse/kepler_orrery/diverging_map.py/ColorMapCreator.__init__/swapped operands of `in`