Skip to content

Commit 7f45da3

Browse files
authored
Merge pull request #387 from simvue-io/hotfix/handle-numpy-object-response
Fix ambiguity issue with numpy artifact retrieval
2 parents c3ac32e + 2c06cc8 commit 7f45da3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

simvue/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,9 @@ def get_artifact(
641641
response.content, mimetype, allow_pickle
642642
)
643643

644-
return content or response.content
644+
# Numpy array return means just 'if content' will be ambiguous
645+
# so must explicitly check if None
646+
return response.content if content is None else content
645647

646648
@prettify_pydantic
647649
@pydantic.validate_call

0 commit comments

Comments
 (0)