60b6d7a3777d1e0c4b17bc954823951aac857fab,io/eolearn/io/sh_add.py,AddGeopediaFeature,execute,#AddGeopediaFeature#Any#,295

Before Change


        if eopatch.feature_exists(self.feature_type, self.feature_name):
            raster = eopatch.get_feature(self.feature_type, self.feature_name)
        else:
            raster = np.ones(dst_shape[1:3], dtype=self.raster_dtype) * self.no_data_val

        new_raster = self._reproject(eopatch, self._to_binary_mask(request_data[0]))

        // update raster

After Change



        request_data, = np.asarray(request.get_data())

        if isinstance(self.raster_value, dict):
            raster = self._map_from_multiclass(eopatch, (height, width), request_data)
        elif isinstance(self.raster_value, (int, float)):
            raster = self._map_from_binaries(eopatch, (height, width), request_data)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: sentinel-hub/eo-learn
Commit Name: 60b6d7a3777d1e0c4b17bc954823951aac857fab
Time: 2018-06-12
Author: devis.peressutti@sinergise.com
File Name: io/eolearn/io/sh_add.py
Class Name: AddGeopediaFeature
Method Name: execute


Project Name: tensorflow/models
Commit Name: 5fc4c351699c9007a727eaaef99413962cf0818f
Time: 2020-12-09
Author: hongkuny@google.com
File Name: official/nlp/modeling/layers/self_attention_mask.py
Class Name: SelfAttentionMask
Method Name: call


Project Name: PyMVPA/PyMVPA
Commit Name: 3c1eafeea79d946575ea5b6b5cb02f945897d2fd
Time: 2009-12-10
Author: michael.hanke@gmail.com
File Name: mvpa/tests/test_mapper.py
Class Name:
Method Name: test_flatten