'Returns a copy of this object, potentially with some changes.
Returns
newcos : Subclass of FLRW
A new instance of this class with the specified changes.
Notes
This assumes that the values of all constructor arguments
are available as properties, which is true of all the provided
subclasses but may not be true of user-provided ones.  You can\'t
change the type of class, so this can\'t be used to change between
flat and non-flat.  If no modifications are requested, then
a reference to this object is returned.
Examples
To make a copy of the Planck13 cosmology with a different Omega_m
and a new name:
>>> from astropy.cosmology import Planck13
>>> newcos = Planck13.clone(name="Modified Planck 2013", Om0=0.35)'

def clone(self, **kwargs):

    if (len(kwargs) == 0):
        return self
    arglist = signature(self.__init__).parameters.keys()
    argdict = {}
    for arg in arglist:
        try:
            val = getattr(self, arg)
            argdict[arg] = val
        except AttributeError:
            errstr = u"Object    did    not    have    property    corresponding    to    constructor    argument    '{}';    perhaps    it    is    a    user    provided    subclass    that    does    not    do    so"
            raise AttributeError(errstr.format(arg))
    for newarg in kwargs:
        if (newarg not in argdict):
            errstr = u"User    provided    argument    '{}'    not    found    in    constructor    for    this    object"
            raise AttributeError(errstr.format(newarg))
        argdict[newarg] = kwargs[newarg]
    return self.__class__(**argdict)
