diff options
| author | J08nY | 2020-07-05 18:37:53 +0200 |
|---|---|---|
| committer | J08nY | 2020-07-05 18:37:53 +0200 |
| commit | 525716254614439cf32e5720bf4c2f2f4aac0f71 (patch) | |
| tree | afea64d782bf1f375cd5a0936be0a30e300c50f7 /pyecsca/sca/trace/sampling.py | |
| parent | a6a4ed2095dcdb3f569726eeea3332644a10699d (diff) | |
| download | pyecsca-525716254614439cf32e5720bf4c2f2f4aac0f71.tar.gz pyecsca-525716254614439cf32e5720bf4c2f2f4aac0f71.tar.zst pyecsca-525716254614439cf32e5720bf4c2f2f4aac0f71.zip | |
More tests for HDF5 and some codestyle fixes.
Diffstat (limited to 'pyecsca/sca/trace/sampling.py')
| -rw-r--r-- | pyecsca/sca/trace/sampling.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyecsca/sca/trace/sampling.py b/pyecsca/sca/trace/sampling.py index 0a32c28..5a4d271 100644 --- a/pyecsca/sca/trace/sampling.py +++ b/pyecsca/sca/trace/sampling.py @@ -16,7 +16,7 @@ def downsample_average(trace: Trace, factor: int = 2) -> Trace: :return: """ resized = np.resize(trace.samples, len(trace.samples) - (len(trace.samples) % factor)) - result_samples = resized.reshape(-1, factor).mean(axis=1).astype(trace.samples.dtype) + result_samples = resized.reshape(-1, factor).mean(axis=1).astype(trace.samples.dtype, copy=False) return trace.with_samples(result_samples) |
