4ab331db8a6380d4785ddffa45895fd4bce2459e,core/eolearn/core/eodata.py,EOPatch,walk_filtered,#,819

Before Change


    def walk_filtered(filesystem, patch_location, features):
         Based on EOPatch.walk generator, but applies feature filtering based on the `features` argument
        
        itr = EOPatch.walk(filesystem, patch_location)
        itr = ((FeatureType(ftype), fname, path) for ftype, fname, path in itr)

        features = FeatureParser(features).feature_collection
        for ftype, fname, path in itr:
            if ftype in [FeatureType.BBOX, FeatureType.TIMESTAMP, FeatureType.META_INFO]:
                yield ftype, fname, path

            if ftype not in features.keys():
                continue

            ftrs = features[ftype]
            if ftrs == Ellipsis or fname in ftrs:
                yield ftype, fname, path

After Change


         Based on EOPatch.walk generator, but applies feature filtering based on the `features` argument
        
        features = FeatureParser(features).feature_collection
        for ftype, fname, path in EOPatch.walk(filesystem, patch_location):
            if ftype.is_meta():
                yield ftype, fname, path

            if ftype not in features:
                continue

            ftrs = features[ftype]
            if ftrs is Ellipsis or fname in ftrs:
                yield ftype, fname, path
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: sentinel-hub/eo-learn
Commit Name: 4ab331db8a6380d4785ddffa45895fd4bce2459e
Time: 2019-12-23
Author: jovan.visnjic@sinergise.com
File Name: core/eolearn/core/eodata.py
Class Name: EOPatch
Method Name: walk_filtered


Project Name: openml/openml-python
Commit Name: 3c680c10486e1a39789b5505a531c7ee4165607a
Time: 2021-02-12
Author: feurerm@informatik.uni-freiburg.de
File Name: tests/conftest.py
Class Name:
Method Name: read_file_list


Project Name: SeanNaren/deepspeech.pytorch
Commit Name: 4ffd4096c0077eb52725d927132a20635b503684
Time: 2018-05-04
Author: miguelvramos@ist.utl.pt
File Name: data/librispeech.py
Class Name:
Method Name: main