fastremap 1.17.0__cp312-cp312-win32.whl → 1.17.1__cp312-cp312-win32.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.
- fastremap/__init__.py +2 -0
- fastremap/fastremap.cp312-win32.pyd +0 -0
- fastremap/fastremap.pyi +7 -0
- fastremap/fastremap.pyx +2 -2
- {fastremap-1.17.0.dist-info → fastremap-1.17.1.dist-info}/METADATA +1 -1
- fastremap-1.17.1.dist-info/RECORD +15 -0
- fastremap-1.17.1.dist-info/licenses/AUTHORS +1 -0
- fastremap-1.17.1.dist-info/pbr.json +1 -0
- fastremap-1.17.0.dist-info/RECORD +0 -15
- fastremap-1.17.0.dist-info/licenses/AUTHORS +0 -1
- fastremap-1.17.0.dist-info/pbr.json +0 -1
- {fastremap-1.17.0.dist-info → fastremap-1.17.1.dist-info}/WHEEL +0 -0
- {fastremap-1.17.0.dist-info → fastremap-1.17.1.dist-info}/licenses/LICENSE +0 -0
- {fastremap-1.17.0.dist-info → fastremap-1.17.1.dist-info}/top_level.txt +0 -0
fastremap/__init__.py
CHANGED
@@ -2,6 +2,7 @@ from .fastremap import (
|
|
2
2
|
ascontiguousarray,
|
3
3
|
asfortranarray,
|
4
4
|
component_map,
|
5
|
+
fit_dtype,
|
5
6
|
foreground,
|
6
7
|
indices,
|
7
8
|
inverse_component_map,
|
@@ -26,6 +27,7 @@ __all__ = [
|
|
26
27
|
"ascontiguousarray",
|
27
28
|
"asfortranarray",
|
28
29
|
"component_map",
|
30
|
+
"fit_dtype",
|
29
31
|
"foreground",
|
30
32
|
"indices",
|
31
33
|
"inverse_component_map",
|
Binary file
|
fastremap/fastremap.pyi
CHANGED
@@ -441,6 +441,13 @@ def ascontiguousarray(arr: NDArray[Any]) -> NDArray[Any]:
|
|
441
441
|
"""
|
442
442
|
...
|
443
443
|
|
444
|
+
def fit_dtype(
|
445
|
+
dtype:DTypeLike,
|
446
|
+
value:Union[int, float, np.integer, np.unsignedinteger, np.complexfloating, np.floating],
|
447
|
+
exotics:bool = False,
|
448
|
+
) -> DTypeLike:
|
449
|
+
...
|
450
|
+
|
444
451
|
def minmax(
|
445
452
|
arr: NDArray[Any],
|
446
453
|
) -> tuple[Union[int, float, None], Union[int, float, None]]:
|
fastremap/fastremap.pyx
CHANGED
@@ -292,7 +292,7 @@ def refit(arr, value=None, increase_only=False, exotics=False):
|
|
292
292
|
else:
|
293
293
|
value = min_value
|
294
294
|
|
295
|
-
dtype =
|
295
|
+
dtype = fit_dtype(arr.dtype, value, exotics=exotics)
|
296
296
|
|
297
297
|
if increase_only and np.dtype(dtype).itemsize <= np.dtype(arr.dtype).itemsize:
|
298
298
|
return arr
|
@@ -300,7 +300,7 @@ def refit(arr, value=None, increase_only=False, exotics=False):
|
|
300
300
|
return arr
|
301
301
|
return arr.astype(dtype)
|
302
302
|
|
303
|
-
def
|
303
|
+
def fit_dtype(dtype, value, exotics=False):
|
304
304
|
"""
|
305
305
|
Find the smallest dtype of the
|
306
306
|
same kind that will fit a given value.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
fastremap/__init__.py,sha256=FZkS1RTiFOnN94vtNENKFehR4t9lLglQmo8_NCug53c,863
|
2
|
+
fastremap/fastremap.cp312-win32.pyd,sha256=8zpkLpPkByxOXlpg99_J1edrAJ1kdNYrlks-0_NhVlY,1761792
|
3
|
+
fastremap/fastremap.pxd,sha256=buQmEJrjfExbqY90ESwGrDld5v09N7oXjVQB-wZvhi8,4066
|
4
|
+
fastremap/fastremap.pyi,sha256=UpwXltjb7FudIwS4372j9n-9C72MAnqJ46aonov9-Xg,15580
|
5
|
+
fastremap/fastremap.pyx,sha256=9rOXFi_4YTVNWVpocdEZNuH0gFoxN8JrqfQrdNQhcIc,46675
|
6
|
+
fastremap/ipt.hpp,sha256=MiyDDgjGAjXJ5m_bEmTvLIO79xVD92EgK0jS_PQjC1I,8261
|
7
|
+
fastremap/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
+
fastremap/ska_flat_hash_map.hpp,sha256=zosmxi4QAdrS8FUzF_4nUPKAX72JmVAfJ-x4W8ztdfQ,63151
|
9
|
+
fastremap-1.17.1.dist-info/licenses/AUTHORS,sha256=Aa4H7O3dtmfq0lF_eATudy11i8K6QAI8LykzASr9bL0,52
|
10
|
+
fastremap-1.17.1.dist-info/licenses/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
|
11
|
+
fastremap-1.17.1.dist-info/METADATA,sha256=1Rr-_s9WkTi23cSZSKLZryuaD15yNmcZpYFrT7naY6c,10532
|
12
|
+
fastremap-1.17.1.dist-info/WHEEL,sha256=LwxTQZ0gyDP_uaeNCLm-ZIktY9hv6x0e22Q-hgFd-po,97
|
13
|
+
fastremap-1.17.1.dist-info/pbr.json,sha256=d8xDOFmffOZN0L2fXbfmb604HGtVnqvcDbVEQWiAZI0,47
|
14
|
+
fastremap-1.17.1.dist-info/top_level.txt,sha256=D-q4-YJbbk7QpuU8fxH9rFQEjV_W6wpdruzTTDV4N5s,10
|
15
|
+
fastremap-1.17.1.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
William Silversmith <william.silversmith@gmail.com>
|
@@ -0,0 +1 @@
|
|
1
|
+
{"git_version": "d754c45", "is_release": false}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
fastremap/__init__.py,sha256=OFQQDhYXoAV4FzQYj1NY908ldDiHIcM7y0H5yvjYLjk,829
|
2
|
-
fastremap/fastremap.cp312-win32.pyd,sha256=Dus4pe1AoQ7ZbQV65jv-YJjUmp9WXWgCokxmSs5n1QU,1761792
|
3
|
-
fastremap/fastremap.pxd,sha256=buQmEJrjfExbqY90ESwGrDld5v09N7oXjVQB-wZvhi8,4066
|
4
|
-
fastremap/fastremap.pyi,sha256=z_jbEROJAKqbr-gO9poQabF1-OBs5_bs-2rDpGjeoWo,15390
|
5
|
-
fastremap/fastremap.pyx,sha256=jqVy6UaiaWyQLSwLLraLskAc9Ib0oilExq-R8FcT7Nw,46677
|
6
|
-
fastremap/ipt.hpp,sha256=MiyDDgjGAjXJ5m_bEmTvLIO79xVD92EgK0jS_PQjC1I,8261
|
7
|
-
fastremap/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
fastremap/ska_flat_hash_map.hpp,sha256=zosmxi4QAdrS8FUzF_4nUPKAX72JmVAfJ-x4W8ztdfQ,63151
|
9
|
-
fastremap-1.17.0.dist-info/licenses/AUTHORS,sha256=fp7K3Hh22cRdHzMj837IAKImGxut2SRouzHe8pNphus,62
|
10
|
-
fastremap-1.17.0.dist-info/licenses/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
|
11
|
-
fastremap-1.17.0.dist-info/METADATA,sha256=6RcLJZVobGkgrU1_1Uv7k_6UCUFyrxe_SweRHh0_NnE,10532
|
12
|
-
fastremap-1.17.0.dist-info/WHEEL,sha256=LwxTQZ0gyDP_uaeNCLm-ZIktY9hv6x0e22Q-hgFd-po,97
|
13
|
-
fastremap-1.17.0.dist-info/pbr.json,sha256=dR1UpQuiiTyrZ7Y1PMguAEXlAjPBXmHM_DXmzrK1gbY,47
|
14
|
-
fastremap-1.17.0.dist-info/top_level.txt,sha256=D-q4-YJbbk7QpuU8fxH9rFQEjV_W6wpdruzTTDV4N5s,10
|
15
|
-
fastremap-1.17.0.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
Matthew Vine <32849887+MattTheCuber@users.noreply.github.com>
|
@@ -1 +0,0 @@
|
|
1
|
-
{"git_version": "1b389a3", "is_release": false}
|
File without changes
|
File without changes
|
File without changes
|