Skip to content

Commit

Permalink
Sum counts
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzbeh committed Jul 8, 2022
1 parent 33ec0e6 commit 7e7b4e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/biopsykit/signals/imu/activity_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _accumulate_minute_bins(data: np.ndarray) -> np.ndarray:
n_samples = 10 * 60
# Pad data at end to "fill" last bin
padded_data = np.pad(data, (0, n_samples - len(data) % n_samples), "constant", constant_values=0)
return padded_data.reshape((len(padded_data) // n_samples, -1)).mean(axis=1)
return padded_data.reshape((len(padded_data) // n_samples, -1)).sum(axis=1)

def calculate(self, data: arr_t) -> arr_t:
"""Calculate Activity Counts from acceleration data.
Expand Down

0 comments on commit 7e7b4e5

Please sign in to comment.