From a27b6cdaab20de6f3b0ce2d6c88cfb729368ad6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiebke=20K=C3=B6pp?= Date: Fri, 8 Mar 2024 16:44:59 -0800 Subject: [PATCH] :bug: Slice into array when copying --- examples/copy_mask_as_result.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/copy_mask_as_result.py b/examples/copy_mask_as_result.py index 80ce92f..ec006fc 100644 --- a/examples/copy_mask_as_result.py +++ b/examples/copy_mask_as_result.py @@ -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"],