Skip to content

Commit

Permalink
Allow scikit-image >= 0.16, fix related adaptive histogram test (#196)
Browse files Browse the repository at this point in the history
* Allow skimage >= 0.16 in setup.py, fix adaptive histogram test

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>

* Add change to changelog

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
  • Loading branch information
hakonanes committed Aug 7, 2020
1 parent 778da53 commit 9a8e361
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Contributors

Changed
-------
- Removed `language_version` in `pre-commit` config file.
- Allow scikit-image >= 0.16.
(`#196 <https://github.com/kikuchipy/kikuchipy/pull/196>`_)
- Removed language_version in pre-commit config file.
(`#195 <https://github.com/kikuchipy/kikuchipy/pull/195>`_)

0.2.2 (2020-05-24)
Expand Down
9 changes: 8 additions & 1 deletion kikuchipy/pattern/tests/test_chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import numpy as np
import pytest
from scipy.ndimage import convolve, gaussian_filter
from skimage import __version__ as skimage_version
from skimage.util.dtype import dtype_range

from kikuchipy.filters.fft_barnes import _fft_filter
Expand Down Expand Up @@ -76,9 +77,15 @@
DYN_CORR_UINT8_SPATIAL_STD2_OMAX250 = np.array(
[[167, 210, 177], [250, 217, 184], [217, 31, 0]], dtype=np.uint8,
)
ADAPT_EQ_UINT8 = np.array(
ADAPT_EQ_UINT8_SKIMAGE16 = np.array(
[[127, 223, 127], [255, 223, 31], [223, 31, 0]], dtype=np.uint8
)
ADAPT_EQ_UINT8_SKIMAGE17 = np.array(
[[92, 215, 92], [255, 215, 92], [215, 26, 0]], dtype=np.uint8
)
ADAPT_EQ_UINT8 = ADAPT_EQ_UINT8_SKIMAGE16
if skimage_version[2:4] == str(17):
ADAPT_EQ_UINT8 = ADAPT_EQ_UINT8_SKIMAGE17


class TestRescaleIntensityChunk:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"matplotlib >= 3.2",
"numpy >= 1.18",
"numba >= 0.48",
"scikit-image >= 0.16, < 0.17",
"scikit-image >= 0.16",
"scikit-learn",
"scipy",
],
Expand Down

0 comments on commit 9a8e361

Please sign in to comment.