Skip to content

Commit

Permalink
Update hyperspy/signal.py
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Prestat <[email protected]>
  • Loading branch information
francisco-dlp and ericpre authored Jun 1, 2024
1 parent a7cb1de commit 5263955
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hyperspy/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6579,10 +6579,8 @@ def add_poissonian_noise(self, keep_dtype=True, random_state=None):
if self._lazy:
kwargs["chunks"] = self.data.chunks

if self._lazy:
self.data[:] = random_state.poisson(lam=self.data, **kwargs)
else:
self.data[:] = random_state.poisson(lam=self.data, **kwargs)
self.data[:] = random_state.poisson(lam=self.data, **kwargs)
self.events.data_changed.trigger(obj=self)
self.events.data_changed.trigger(obj=self)

def add_gaussian_noise(self, std, random_state=None):
Expand Down

0 comments on commit 5263955

Please sign in to comment.