ca14cf72e3e4bd3a6136cafad8701ac41f48f09b,yellowbrick/cluster/elbow.py,KElbowVisualizer,__init__,#KElbowVisualizer#Any#Any#Any#Any#Any#,206

Before Change



        // Convert K into a tuple argument if an integer
        if isinstance(k, int):
            k = (2, k+1)

        // Expand k in to the values we will use, capturing exceptions
        try:
            k = tuple(k)
            self.k_values_ = list(range(*k))
        except:
            raise YellowbrickValueError((
                "Specify a range or maximal K value, the value "{}" "

After Change


        if isinstance(k, int):
            self.k_values_ = list(range(2, k+1))
        elif isinstance(k, tuple) and len(k) == 2 and \
                all(isinstance(x, (int, np.integer)) for x in k):
            self.k_values_ = list(range(*k))
        elif isinstance(k, collections.Iterable) and \
                all(isinstance(x, (int, np.integer)) for x in k):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: DistrictDataLabs/yellowbrick
Commit Name: ca14cf72e3e4bd3a6136cafad8701ac41f48f09b
Time: 2018-08-25
Author: davidwaterman@gmail.com
File Name: yellowbrick/cluster/elbow.py
Class Name: KElbowVisualizer
Method Name: __init__


Project Name: rtqichen/torchdiffeq
Commit Name: 1b93cfeca5f2503eafc4ec773353254cf077fb9f
Time: 2020-07-28
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/fixed_adams.py
Class Name: AdamsBashforthMoulton
Method Name: _has_converged


Project Name: eth-cscs/reframe
Commit Name: 1ac9003c0bbf7297e49fc62e6cb6326192727d84
Time: 2018-10-04
Author: karakasis@cscs.ch
File Name: reframe/core/fields.py
Class Name: TypedField
Method Name: __init__