numpyimage 3.4.1__tar.gz → 3.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {numpyimage-3.4.1/numpyimage.egg-info → numpyimage-3.4.2}/PKG-INFO +1 -1
- {numpyimage-3.4.1 → numpyimage-3.4.2}/npimage/imageio.py +1 -1
- {numpyimage-3.4.1 → numpyimage-3.4.2}/npimage/operations.py +4 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/npimage/utils.py +4 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2/numpyimage.egg-info}/PKG-INFO +1 -1
- {numpyimage-3.4.1 → numpyimage-3.4.2}/pyproject.toml +1 -1
- {numpyimage-3.4.1 → numpyimage-3.4.2}/LICENSE +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/README.md +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/npimage/__init__.py +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/npimage/align.py +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/npimage/graphics.py +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/npimage/nrrd_utils.py +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/npimage/vidio.py +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/numpyimage.egg-info/SOURCES.txt +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/numpyimage.egg-info/dependency_links.txt +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/numpyimage.egg-info/requires.txt +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/numpyimage.egg-info/top_level.txt +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/setup.cfg +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/tests/test_heic.py +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/tests/test_pbm.py +0 -0
- {numpyimage-3.4.1 → numpyimage-3.4.2}/tests/test_video_writers.py +0 -0
|
@@ -411,7 +411,7 @@ def show(data,
|
|
|
411
411
|
if utils.isint(channel_axis) and channel_axis != -1:
|
|
412
412
|
data = np.moveaxis(data, utils.find_channel_axis(data), -1)
|
|
413
413
|
|
|
414
|
-
if data.dtype ==
|
|
414
|
+
if data.dtype == bool:
|
|
415
415
|
data = data.astype(np.uint8) * 255
|
|
416
416
|
elif convert_to_8bit and data.dtype != np.uint8:
|
|
417
417
|
if any(key in convert_kwargs for key in
|
|
@@ -134,6 +134,10 @@ def cast(image: np.ndarray,
|
|
|
134
134
|
else:
|
|
135
135
|
raise TypeError(f'Unsupported dtype: {output_dtype}')
|
|
136
136
|
|
|
137
|
+
if (bottom_value is not None or top_value is not None
|
|
138
|
+
or bottom_percentile != 0.05 or top_percentile != 99.95):
|
|
139
|
+
maximize_contrast = True
|
|
140
|
+
|
|
137
141
|
if not maximize_contrast:
|
|
138
142
|
if (round_before_cast_to_int
|
|
139
143
|
and np.issubdtype(output_dtype, np.integer)
|
|
@@ -67,6 +67,10 @@ def isint(n):
|
|
|
67
67
|
This function does NOT recognize integer types from other packages
|
|
68
68
|
including TensorFlow, PyTorch, or JAX.
|
|
69
69
|
"""
|
|
70
|
+
if isinstance(n, np.ndarray) and n.ndim > 1:
|
|
71
|
+
raise TypeError("npimage.isint is meant for scalars and vectors,"
|
|
72
|
+
" not matrices. Use np.issubdtype(n.dtype, np.integer)"
|
|
73
|
+
" directly if you want to check your array's type.")
|
|
70
74
|
try:
|
|
71
75
|
return [np.issubdtype(type(a), np.integer) for a in n]
|
|
72
76
|
except TypeError:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|