Skip to content

Commit

Permalink
Merge pull request #1078 from VincentBeaud/Numpy_deprecation_warning
Browse files Browse the repository at this point in the history
Avoid scalar with dim > 0 by squeezing. Passes test and pep8 no warning.
  • Loading branch information
arnaudbore authored Dec 12, 2024
2 parents 40253b5 + 7ee3065 commit e256482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scilpy/tractograms/dps_and_dpp_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def project_dpp_to_map(sft, dpp_key, sum_lines=False, endpoints_only=False):
for p in points:
x, y, z = sft.streamlines[s][p, :].astype(int) # Or floor
count[x, y, z] += 1
the_map[x, y, z] += sft.data_per_point[dpp_key][s][p]
the_map[x, y, z] += np.squeeze(sft.data_per_point[dpp_key][s][p])

if not sum_lines:
count = np.maximum(count, 1e-6) # Avoid division by 0
Expand Down

0 comments on commit e256482

Please sign in to comment.