@classmethod<EOL><INDENT>def train(cls, new_data, old=None):<DEDENT>
if not len(new_data):<EOL><INDENT>return old<EOL><DEDENT>if not hasattr(new_data, '<STR_LIT>'):<EOL><INDENT>new_data = np.asarray(new_data)<EOL><DEDENT>if new_data.dtype.kind not in CONTINUOUS_KINDS:<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>")<EOL><DEDENT>if old is not None:<EOL><INDENT>new_data = np.hstack([new_data, old])<EOL><DEDENT>return min_max(new_data, na_rm=True, finite=True)<EOL>
Train a continuous scale

Parameters
----------
new_data : array_like
    New values
old : array_like
    Old range. Most likely a tuple of length 2.

Returns
-------
out : tuple
    Limits(range) of the scale