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

MAINTENANCE: rename sum to sum_labels and add a deprecation warning #123 #172

Merged
merged 15 commits into from
Nov 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
MAINTENANCE: rename sum to sum_labels and add a deprecation warning #123
  • Loading branch information
tkoyama010 committed Nov 1, 2020
commit f135a7d5847ff701166475afb12f25f9b01626e1
8 changes: 4 additions & 4 deletions dask_image/ndmeasure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"minimum",
"minimum_position",
"standard_deviation",
tkoyama010 marked this conversation as resolved.
Show resolved Hide resolved
"sum",
tkoyama010 marked this conversation as resolved.
Show resolved Hide resolved
"sum_labels",
"variance",
]

Expand Down Expand Up @@ -678,9 +678,9 @@ def standard_deviation(image, label_image=None, index=None):
return std_lbl


def sum(image, label_image=None, index=None):
def sum_labels(image, label_image=None, index=None):
"""
Find the sum over an image at specified subregions.
Find the sum_labels over an image at specified subregions.
tkoyama010 marked this conversation as resolved.
Show resolved Hide resolved

Parameters
----------
Expand All @@ -696,7 +696,7 @@ def sum(image, label_image=None, index=None):

Returns
-------
sum : ndarray
sum_lbl : ndarray
Sum of ``image`` over the ``index`` selected regions from
``label_image``.
"""
Expand Down
2 changes: 1 addition & 1 deletion docs/coverage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ This table shows which SciPy ndimage functions are supported by dask-image.
* - ``standard_deviation``
- ✓
- ✓
* - ``sum``
* - ``sum_labels``
- ✓
- ✓
* - ``uniform_filter``
Expand Down
4 changes: 2 additions & 2 deletions tests/test_dask_image/test_ndmeasure/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"minimum",
"minimum_position",
"standard_deviation",
"sum",
"sum_labels",
"variance",
]
)
Expand Down Expand Up @@ -88,7 +88,7 @@ def test_center_of_mass(datatype):
"minimum",
"minimum_position",
"standard_deviation",
"sum",
"sum_labels",
"variance",
]
)
Expand Down