2cbc9dd07c64d9e1ed62a36b1ee48169c86d8ade,lingpy/convert/strings.py,,pap2nex,#Any#Any#Any#Any#,252

Before Change


    maxTax = max([len(taxon) for taxon in taxa])

    // check whether paps are dict or list
    try:
        paps.keys()
        new_paps = []
        for key in sorted(paps):
            new_paps.append(paps[key])
    except AttributeError:
        new_paps = paps

    // create the matrix
    matrix = ""

    for i, taxon in enumerate(taxa):
        tmp = "{0:XXX} "

After Change


    // check whether paps are dict or list
    if hasattr(paps, "keys"):
        new_paps = [paps[k] for k in sorted(paps)]
        reference = [k for k in sorted(paps)]
    else:
        new_paps = paps
        reference = [k for k in range(1, len(paps)+1)]
    
    // create reference
    ref_string = ""
    for i, ref in enumerate(reference):
        ref_string += "[{0} :: {1}]\n".format(i, ref)
    // create the matrix
    matrix = ""

    for i, taxon in enumerate(taxa):
        tmp = "{0:XXX} "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: lingpy/lingpy
Commit Name: 2cbc9dd07c64d9e1ed62a36b1ee48169c86d8ade
Time: 2016-05-05
Author: mattis.list@uni-marburg.de
File Name: lingpy/convert/strings.py
Class Name:
Method Name: pap2nex


Project Name: senarvi/theanolm
Commit Name: bcf723a2f67a372e6b03a453149a82ecf2766fff
Time: 2015-12-24
Author: seppo.git@marjaniemi.com
File Name: theanolm/network.py
Class Name: Architecture
Method Name: from_state


Project Name: polyaxon/polyaxon
Commit Name: 979546167c1e0f935a368e9d01895d1cd624986c
Time: 2019-02-11
Author: mouradmourafiq@gmail.com
File Name: polystores/stores/azure_store.py
Class Name: AzureStore
Method Name: delete