fastremap 1.15.1__cp39-cp39-macosx_11_0_arm64.whl → 1.16.0__cp39-cp39-macosx_11_0_arm64.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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: fastremap
3
- Version: 1.15.1
3
+ Version: 1.16.0
4
4
  Summary: Remap, mask, renumber, unique, and in-place transposition of 3D labeled images. Point cloud too.
5
5
  Home-page: https://github.com/seung-lab/fastremap/
6
6
  Author: William Silversmith
@@ -16,11 +16,21 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Topic :: Utilities
19
- Requires-Python: >=3.8,<4.0
19
+ Requires-Python: >=3.9,<4.0
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
22
  License-File: AUTHORS
23
23
  Requires-Dist: numpy
24
+ Dynamic: author
25
+ Dynamic: author-email
26
+ Dynamic: classifier
27
+ Dynamic: description
28
+ Dynamic: description-content-type
29
+ Dynamic: home-page
30
+ Dynamic: license-file
31
+ Dynamic: requires-dist
32
+ Dynamic: requires-python
33
+ Dynamic: summary
24
34
 
25
35
  [![PyPI version](https://badge.fury.io/py/fastremap.svg)](https://badge.fury.io/py/fastremap)
26
36
 
@@ -32,12 +42,18 @@ Renumber and relabel Numpy arrays at C++ speed and physically convert rectangula
32
42
  import fastremap
33
43
 
34
44
  uniq, cts = fastremap.unique(labels, return_counts=True) # may be much faster than np.unique
45
+
46
+ idxs = fastremap.indices(labels, 1231) # important for huge arrays
47
+
35
48
  labels, remapping = fastremap.renumber(labels, in_place=True) # relabel values from 1 and refit data type
36
49
  ptc = fastremap.point_cloud(labels) # dict of coordinates by label
37
50
 
38
51
  labels = fastremap.refit(labels) # resize the data type of the array to fit extrema
39
52
  labels = fastremap.refit(labels, value=-35) # resize the data type to fit the value provided
40
53
 
54
+ wider_dtype = fastremap.widen_dtype(np.uint32) # np.uint64
55
+ narrower_dtype = fastremap.narrow_dtype(np.uint32) # np.uint16
56
+
41
57
  # remap all occurances of 1 -> 2
42
58
  labels = fastremap.remap(labels, { 1: 2 }, preserve_missing_labels=True, in_place=True)
43
59
 
@@ -68,8 +84,11 @@ binaries = fastremap.tobytes(labels, (64,64,64), order="F")
68
84
  ## All Available Functions
69
85
  - **unique:** Faster implementation of `np.unique`.
70
86
  - **renumber:** Relabel array from 1 to N which can often use smaller datatypes.
87
+ - **indices:** Optimized search for matching values.
71
88
  - **remap:** Custom relabeling of values in an array from a dictionary.
72
89
  - **refit:** Resize the data type of an array to the smallest that can contain the most extreme values in it.
90
+ - **narrow_dtype:** Find the next sized up dtype. e.g. uint16 -> uint32
91
+ - **widen_dtype:** Find the next sized down dtype. e.g. uint16 -> uint8
73
92
  - **mask:** Zero out labels in an array specified by a given list.
74
93
  - **mask_except**: Zero out all labels except those specified in a given list.
75
94
  - **component_map**: Extract an int-to-int dictionary mapping of labels from one image containing component labels to another parent labels.
@@ -0,0 +1,8 @@
1
+ fastremap.cpython-39-darwin.so,sha256=a5ITREB7g4djxHfMvXKY0qBP8TukDWhQUYyB2Vi8dV4,2318640
2
+ fastremap-1.16.0.dist-info/RECORD,,
3
+ fastremap-1.16.0.dist-info/WHEEL,sha256=25c7jxmzya5ORDpqz9NT-OlZSbKgFRmwRgILUSJcHB0,107
4
+ fastremap-1.16.0.dist-info/pbr.json,sha256=N8TajEni-1ZfdHBA0pxZ06J8eAtBmWTdhV17-l2l_n4,47
5
+ fastremap-1.16.0.dist-info/top_level.txt,sha256=D-q4-YJbbk7QpuU8fxH9rFQEjV_W6wpdruzTTDV4N5s,10
6
+ fastremap-1.16.0.dist-info/METADATA,sha256=uupYjwU3U0iLBpdEUfbaYOc0iHm8fR_p3klI_5IKaNo,10169
7
+ fastremap-1.16.0.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
8
+ fastremap-1.16.0.dist-info/licenses/AUTHORS,sha256=Aa4H7O3dtmfq0lF_eATudy11i8K6QAI8LykzASr9bL0,52
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (80.1.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp39-cp39-macosx_11_0_arm64
5
5
 
@@ -0,0 +1 @@
1
+ {"git_version": "a7c2749", "is_release": false}
Binary file
@@ -1,8 +0,0 @@
1
- fastremap.cpython-39-darwin.so,sha256=3Z99FQxI8Z_QFL6YWYmPW48GL0dwFP6NAHjncnurhVE,2215680
2
- fastremap-1.15.1.dist-info/RECORD,,
3
- fastremap-1.15.1.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
4
- fastremap-1.15.1.dist-info/AUTHORS,sha256=Aa4H7O3dtmfq0lF_eATudy11i8K6QAI8LykzASr9bL0,52
5
- fastremap-1.15.1.dist-info/WHEEL,sha256=bpdNn3EW1Ro7rhzacUi9J-tn-B2haoCtXthtgNlZT0g,107
6
- fastremap-1.15.1.dist-info/pbr.json,sha256=b77m2uoyXaN-c7-BVxEmFd75JW-Qj02KkOHiAhpnJgk,47
7
- fastremap-1.15.1.dist-info/top_level.txt,sha256=D-q4-YJbbk7QpuU8fxH9rFQEjV_W6wpdruzTTDV4N5s,10
8
- fastremap-1.15.1.dist-info/METADATA,sha256=MyHdMXk6pj0pVjRWd0wRmNIMqjJ0TfWP6s4gHE5be40,9561
@@ -1 +0,0 @@
1
- {"git_version": "0ea7a0b", "is_release": false}