Skip to content

Commit 1165dec

Browse files
Merge pull request #168 from haesleinhuepf/git-bob-mod-Dox7E6KqvF
Fix AttributeError by adding type check for colormap in imshow function.
2 parents f0f6b4b + 2132252 commit 1165dec

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="stackview",
8-
version="0.16.1",
8+
version="0.16.2",
99
author="Robert Haase",
1010
author_email="[email protected]",
1111
description="Interactive image stack viewing in jupyter notebooks",

stackview/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.16.1"
1+
__version__ = "0.16.2"
22

33
from ._static_view import jupyter_displayable_output, insight
44
from ._utilities import merge_rgb
@@ -25,4 +25,3 @@
2525
from ._wordcloudplot import wordcloudplot
2626
from ._add_bounding_boxes import add_bounding_boxes
2727
from ._histogram import histogram
28-

stackview/_imshow.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import warnings
22

3-
43
def imshow(image,
54
title:str = None,
65
labels: bool = None,
@@ -79,7 +78,7 @@ def imshow(image,
7978
if colormap is None:
8079
colormap = "Greys_r"
8180

82-
if colormap.startswith("pure_"):
81+
if isinstance(colormap, str) and colormap.startswith("pure_"):
8382
colormap = create_colormap(colormap)
8483

8584
if labels:

0 commit comments

Comments
 (0)