666b01f0a3c060be93b804b27814af58e1e50aac,plotnine/aes.py,,reorder,#,471

Before Change


    ordered = order
    if ordered is None:
        ordered = array_kind.ordinal(x)
    idx = np.argsort(y)
    x = np.asarray(x)
    categories = pd.unique(x[idx])
    return pd.Categorical(x, categories=categories, ordered=ordered)


// These are function that can be called by the user inside the aes()

After Change


        ...
    ValueError: Lengths are not equal. len(c) is 7 and len(x) is 6.
    
    if len(x) != len(y):
        raise ValueError(
            "Lengths are not equal. len(x) is {} and len(x) is {}.".format(
                len(x), len(y)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: has2k1/plotnine
Commit Name: 666b01f0a3c060be93b804b27814af58e1e50aac
Time: 2020-03-21
Author: has2k1@gmail.com
File Name: plotnine/aes.py
Class Name:
Method Name: reorder


Project Name: WheatonCS/Lexos
Commit Name: 70fcd3094baba3139afcda727683d58c2928261f
Time: 2017-08-04
Author: liu_xinru@wheatoncollege.edu
File Name: lexos/processors/analyze/similarity.py
Class Name:
Method Name: similarity_maker


Project Name: WheatonCS/Lexos
Commit Name: ce5da48b8586d7cfdb392b8cad1988e6bfdd17d5
Time: 2017-08-03
Author: liu_xinru@wheatoncollege.edu
File Name: lexos/processors/analyze/similarity.py
Class Name:
Method Name: similarity_maker