Skip to content

Commit

Permalink
Merge pull request #107 from eEcoLiDAR/entropy_z_crashing_103
Browse files Browse the repository at this point in the history
Entropy z crashing 103
  • Loading branch information
cwmeijer committed Apr 11, 2018
2 parents 3139bee + 023aa8d commit e3ac7df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions laserchicken/feature_extractor/entropy_feature_extractor.py
Expand Up @@ -31,6 +31,8 @@ def extract(self, source_pc, neighborhood, target_pc, target_index, volume_descr
z = source_pc[keys.point]["z"]["data"][neighborhood]
_z_min = np.min(z) if self.z_min is None else self.z_min
_z_max = np.max(z) if self.z_max is None else self.z_max
if (_z_min == _z_max):
return 0
n_bins = int(np.ceil((_z_max - _z_min) / self.layer_thickness))
data = np.histogram(z, bins=n_bins, range=(
_z_min, _z_max), density=True)[0]
Expand Down

0 comments on commit e3ac7df

Please sign in to comment.