Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNT] - Fix presence report printing for consistency #341

Merged
merged 3 commits into from
Mar 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion specparam/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def gen_time_results_str(time_model, concise=False):
np.nanmean(time_model.time_results[pe_labels['cf'][ind]]),
np.nanmean(time_model.time_results[pe_labels['pw'][ind]]),
np.nanmean(time_model.time_results[pe_labels['bw'][ind]]),
compute_presence(time_model.time_results[pe_labels['cf'][ind]]))
compute_presence(time_model.time_results[pe_labels['cf'][ind]], output='percent'))
for ind, label in enumerate(band_labels)],
'',

Expand Down
2 changes: 1 addition & 1 deletion specparam/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def compute_presence(data, average=False, output='ratio'):
data : 1d or 2d array
Data array to check presence of.
average : bool, optional, default: False
Whether to average across . Only used for 2d array inputs.
Whether to average across elements. Only used for 2d array inputs.
If False, for 2d array, the output is an array matching the length of the 0th dimension of the input.
If True, for 2d arrays, the output is a single value averaged across the whole array.
output : {'ratio', 'percent'}
Expand Down