Skip to content

Commit

Permalink
🐛 Slice into array when copying
Browse files Browse the repository at this point in the history
  • Loading branch information
Wiebke committed Mar 9, 2024
1 parent 8b53e25 commit a27b6cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/copy_mask_as_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@

def copy_mask_as_result(mask_uri, job_id, quick_inference=True):
mask_client = from_uri(mask_uri, api_key=SEG_TILED_API_KEY)
mask = mask_client["mask"]
mask = mask_client["mask"][:]
mask_metadata = mask_client.metadata

print(
f"Copying mask with unique values: {np.unique(mask)} and shape: {mask.shape}."
)

result_client = from_uri(SEG_TILED_URI, api_key=SEG_TILED_API_KEY)
print(result_client)

result_container = result_client.create_container(key=job_id)
result_metadata = {
"data_uri": mask_metadata["data_uri"],
Expand Down

0 comments on commit a27b6cd

Please sign in to comment.