5add5bac13b6843bd1d1fd330b4f8cf349529f77,deepchem/feat/mol_graphs.py,ConvMol,agglomerate_mols,#Any#Any#Any#,255

Before Change


    // Get atoms by degree
    atoms_by_deg = [
        mol.get_atoms_with_deg(deg)
        for deg in range(min_deg, max_deg + 1)
        for mol in mols
    ]

    // stack the atoms
    all_atoms = np.vstack(atoms_by_deg)

    // Sort all atoms by degree.
    // Get the size of each atom list separated by molecule id, then by degree
    mol_deg_sz = [[mol.get_num_atoms_with_deg(deg)

After Change



    // Get atoms by degree
    atoms_by_deg = np.concatenate([x.atom_features for x in mols])
    degree_vector = np.concatenate([x.degree_list for x in mols], axis=0)
    all_atoms = atoms_by_deg[degree_vector.argsort(kind="mergesort")]

    // Sort all atoms by degree.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: deepchem/deepchem
Commit Name: 5add5bac13b6843bd1d1fd330b4f8cf349529f77
Time: 2018-07-31
Author: lilleswing@gmail.com
File Name: deepchem/feat/mol_graphs.py
Class Name: ConvMol
Method Name: agglomerate_mols


Project Name: danforthcenter/plantcv
Commit Name: 02003918155f6290ff207a01d6485f2066fd35b6
Time: 2019-06-18
Author: haleyschuhl@gmail.com
File Name: plantcv/plantcv/object_composition.py
Class Name:
Method Name: object_composition


Project Name: GPflow/GPflow
Commit Name: 5809cb0b339612434f4f332a91a2cd3e4570c34d
Time: 2018-02-26
Author: james@prowler.io
File Name: gpflow/transforms.py
Class Name: LowerTriangular
Method Name: backward