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:
        import pandas as pd
        features = pd.DataFrame(features, index=args.fnames, columns=colnames)
        features.to_csv(args.output, sep="\t")
    except ImportError:
        np.savetxt(args.output, features)

After Change


                args.output.write(cname)
            args.output.write("\n")
            first = False
        for fs in cur:
            args.output.write(fname)
            for f in fs:
                args.output.write("\t")
                args.output.write("{:.8}".format(f))
            args.output.write("\n")

if __name__ == "__main__":
    main()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: yahoo/TensorFlowOnSpark
Commit Name: 981e4266d4ea816b08a762193bd52f40cd1a3242
Time: 2019-08-07
Author: leewyang@verizonmedia.com
File Name: examples/mnist/keras/mnist_inference.py
Class Name:
Method Name: inference


Project Name: ricsinaruto/Seq2seqChatbots
Commit Name: d9748278abf04a9c74a95053fda62d0bff8b9f93
Time: 2019-02-16
Author: ricsinaruto@hotmail.com
File Name: t2t_csaky/utils/run.py
Class Name:
Method Name: experiment