You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`partition_index_gray`|`helper._partition_index_gray_python`| part of aggregate |
153
+
|`partition_indices_gray_batch`|`helper._partition_indices_gray_batch_python`| part of batch |
154
+
155
+
**What is NOT in Rust** (intentionally kept in NumPy for seed compatibility):
156
+
-`simhash_matrix_from_seed`, `ams_projection_matrix_from_seed` — depend on `np.random.default_rng`
157
+
-`count_sketch_vector_from_seed` — same reason
158
+
-`Muvera.__init__`, public API signatures — 100% unchanged
159
+
123
160
### Batch Processing
124
161
125
-
The library supports three input formats:
162
+
The library supports two input formats:
126
163
-**Single**: `(num_vectors, dimension)` - processes one point cloud
127
-
-**Uniform batch**: `(batch_size, num_vectors, dimension)` - all point clouds have same length
128
164
-**Variable-length batch**: `list[np.ndarray]` - each point cloud has different length (recommended for real-world data)
129
165
130
-
Variable-length batch processing flattens all point clouds, processes them together, then aggregates per-document using `np.add.at()`for efficient scatter-add operations.
166
+
Variable-length batch processing flattens all point clouds, processes them together, then aggregates per-document using Rust `scatter_add_partitions` (or `np.add.at()`fallback).
131
167
132
168
## Code Conventions
133
169
170
+
### Python
134
171
- NumPy-style docstrings (configured in pyproject.toml)
135
172
- Type hints required (Python 3.9+ syntax with `|` for unions)
136
173
- Line length: 100 characters
137
174
- Use `np.float32` for all embeddings (memory efficiency)
138
175
- Use `np.uint32` for partition indices
139
176
- Random number generation via `np.random.default_rng(seed)` for reproducibility
0 commit comments