mergechannels 0.5.0__cp312-cp312-win_amd64.whl → 0.5.1__cp312-cp312-win_amd64.whl

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.

Potentially problematic release.


This version of mergechannels might be problematic. Click here for more details.

@@ -1,6 +1,5 @@
1
1
  from __future__ import annotations
2
2
  from typing import TYPE_CHECKING, Literal, Sequence, Union
3
- from nptyping import NDArray, Shape, UInt8
4
3
  import numpy as np
5
4
 
6
5
  from mergechannels._blending import BLENDING_OPTIONS
@@ -9,6 +8,11 @@ from mergechannels._luts import COLORMAPS
9
8
  if TYPE_CHECKING:
10
9
  from matplotlib.colors import Colormap as MatplotlibColormap
11
10
  from cmap import Colormap as CmapColormap
11
+ from nptyping import (
12
+ NDArray,
13
+ Shape,
14
+ UInt8,
15
+ )
12
16
 
13
17
 
14
18
  Number = Union[int, float]
@@ -7,11 +7,6 @@ from typing import (
7
7
  )
8
8
 
9
9
  import numpy as np
10
- from nptyping import (
11
- NDArray,
12
- Shape,
13
- UInt8,
14
- )
15
10
 
16
11
  from mergechannels import (
17
12
  dispatch_single_channel,
@@ -23,6 +18,11 @@ from ._blending import BLENDING_OPTIONS
23
18
  if TYPE_CHECKING:
24
19
  from matplotlib.colors import Colormap as MatplotlibColormap
25
20
  from cmap import Colormap as CmapColormap
21
+ from nptyping import (
22
+ NDArray,
23
+ Shape,
24
+ UInt8,
25
+ )
26
26
 
27
27
  def _parse_cmap_arguments(
28
28
  color: Union[
@@ -56,7 +56,11 @@ def _parse_cmap_arguments(
56
56
  except AttributeError: # must be a list of lists or an array castable to u8 (256, 3)
57
57
  cmap_values = np.asarray(color).astype('uint8') # type: ignore
58
58
 
59
- if not isinstance(cmap_values, NDArray[Shape['256, 3'], UInt8]): # type: ignore
59
+ if not (
60
+ isinstance(cmap_values, np.ndarray)
61
+ and cmap_values.shape == (256, 3)
62
+ and cmap_values.dtype == np.uint8
63
+ ):
60
64
  raise ValueError(
61
65
  'Expected a matplotlib colormap, a cmaps colormap, or an object directly castable to '
62
66
  f'an 8-bit array of shape (256, 3), got {type(cmap_values)}: {color}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mergechannels
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -11,8 +11,9 @@ Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
- Requires-Dist: nptyping==2.5.0
15
14
  Requires-Dist: numpy>1.25.0
15
+ Requires-Dist: nptyping==2.5.0 ; extra == 'types'
16
+ Provides-Extra: types
16
17
  License-File: LICENSE
17
18
  Summary: Apply and merge colormaps
18
19
  Author-email: Zac Swider <zac.swider@gmail.com>
@@ -0,0 +1,11 @@
1
+ mergechannels-0.5.1.dist-info/METADATA,sha256=rIYZKPznBcE7igHs31c8blRLIc_OZATVjlhNLom7PWw,37137
2
+ mergechannels-0.5.1.dist-info/WHEEL,sha256=nt3Fvhb4VwdyxisCUlWW94P627fWRNU9JcC8CrJr20Q,96
3
+ mergechannels-0.5.1.dist-info/licenses/LICENSE,sha256=13XDkLAzpvwoVSoi1BksE9O_nNxoO9WVFRcF1HPMvJo,1092
4
+ mergechannels/__init__.py,sha256=30hHf8JegSl3W420EJTOG-SsppYYW1kFgc_keO4-qZE,410
5
+ mergechannels/__init__.pyi,sha256=YlbUnsRrnenJ-qI-YXU5PHbYTmbyOqVZSCZTPJ9BY0s,1846
6
+ mergechannels/_blending.py,sha256=fyw9IV1QzSR_RKCJtI-q67ylnBv9PrA4ofX-uvXXJaY,87
7
+ mergechannels/_internal.py,sha256=nFLlDSQqb5TiMHAbSvyAj_x6-Oin-2Uy-kci4R2eHD4,3622
8
+ mergechannels/_luts.py,sha256=gjqUyeL4mIb-ZOErBCeSRuY0pgcSdhLp7LaFjBDpHC0,3142
9
+ mergechannels/mergechannels.cp312-win_amd64.pyd,sha256=jVqNvy77BVy18Ooy6AStkYg6M49AJDbWmlCORxJU0dA,650240
10
+ mergechannels/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ mergechannels-0.5.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.8.6)
2
+ Generator: maturin (1.9.1)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-win_amd64
@@ -1,11 +0,0 @@
1
- mergechannels-0.5.0.dist-info/METADATA,sha256=v5M55Bw1ytyViXb9UPSazRP_zWraDyzOCIFEPwT-Riw,37096
2
- mergechannels-0.5.0.dist-info/WHEEL,sha256=YpU2aDuTyBIvwRZn8idqScP-vkQ8DUGkCILtYmMfnFY,96
3
- mergechannels-0.5.0.dist-info/licenses/LICENSE,sha256=13XDkLAzpvwoVSoi1BksE9O_nNxoO9WVFRcF1HPMvJo,1092
4
- mergechannels/__init__.py,sha256=30hHf8JegSl3W420EJTOG-SsppYYW1kFgc_keO4-qZE,410
5
- mergechannels/__init__.pyi,sha256=FiVLoisn8_yYaK8WngT9mv8oPrJ5rDVxLdFW_oV9jhs,1805
6
- mergechannels/_blending.py,sha256=fyw9IV1QzSR_RKCJtI-q67ylnBv9PrA4ofX-uvXXJaY,87
7
- mergechannels/_internal.py,sha256=KEyaD41h9EWnCFnj3x3Vln_BDsPrrqw1gyN9MT4okOc,3571
8
- mergechannels/_luts.py,sha256=gjqUyeL4mIb-ZOErBCeSRuY0pgcSdhLp7LaFjBDpHC0,3142
9
- mergechannels/mergechannels.cp312-win_amd64.pyd,sha256=SHVbJrpCu5AiMcCOYS447C5xl_IRYmwxDAN1F5yAr8A,656896
10
- mergechannels/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- mergechannels-0.5.0.dist-info/RECORD,,