Skip to content

Commit

Permalink
fix: relationship key encoded incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Feb 11, 2024
1 parent ed4761a commit bbabf64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/neuroglancer/write_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ def _serialize_annotations_by_related_id(self, path, related_id_dict, shard_spec
dataset = ts.KvStore.open(spec).result()
txn = ts.Transaction()
for related_id, annotations in related_id_dict.items():
# convert the ann.id to a binary representation of a uint64
key = related_id.to_bytes(8, "little")
# convert the related_id to a binary representation of a uint64
key = np.ascontiguousarray(related_id, dtype=">u8").tobytes()
value = self._encode_multiple_annotations(annotations)
dataset.with_transaction(txn)[key] = value
txn.commit_async().result()
Expand Down

0 comments on commit bbabf64

Please sign in to comment.