64624fb2b46a228fef1141e1ded84e52acccaf6e,bin/mahotas-features.py,,main,#,56

Before Change


For example, use --haralick switch to compute Haralick features\n""")
        sys.exit(1)

    features = []
    colnames = []
    first = True
    for fname in args.fnames:
        cur = []
        im = read_bw(fname, args)
        if args.haralick:
            har = mh.features.haralick(im, return_mean_ptp=True)
            cur.append(har)
            if first:
                colnames.extend(mh.features.texture.haralick_labels[:-1])
                colnames.extend(["ptp:{}".format(ell) for ell in mh.features.texture.haralick_labels[:-1]])

        features.append(np.concatenate(cur))
        first = False

    features = np.array(features)
    try:

After Change


            for cname in colnames:
                args.output.write("\t")
                args.output.write(cname)
            args.output.write("\n")
            first = False
        for fs in cur:
            args.output.write(fname)
            for f in fs:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: luispedro/mahotas
Commit Name: 64624fb2b46a228fef1141e1ded84e52acccaf6e
Time: 2015-06-09
Author: luis@luispedro.org
File Name: bin/mahotas-features.py
Class Name:
Method Name: main


Project Name: OpenNMT/OpenNMT-py
Commit Name: 63871d5ab3301d015805abddd8f4259680d6a24a
Time: 2017-09-21
Author: bpeters@coli.uni-saarland.de
File Name: translate.py
Class Name:
Method Name: main


Project Name: MTG/freesound
Commit Name: 68ac615b46cf62ae99d20bba66ae53aea11b80d2
Time: 2020-07-12
Author: pademil@tin.it
File Name: accounts/views.py
Class Name:
Method Name: attribution