From c0f9ea73a0f654474ce25078bb3b7a249e90c899 Mon Sep 17 00:00:00 2001 From: Rickard Holmberg Date: Tue, 17 Dec 2024 16:02:17 +0100 Subject: [PATCH] Fix check for scalar binary result (#244) --- h5pyd/_hl/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5pyd/_hl/dataset.py b/h5pyd/_hl/dataset.py index 76ab8e6..3678825 100644 --- a/h5pyd/_hl/dataset.py +++ b/h5pyd/_hl/dataset.py @@ -1022,7 +1022,7 @@ def __getitem__(self, args, new_dtype=None): req = "/datasets/" + self.id.uuid + "/value" rsp = self.GET(req, format="binary") - if isinstance(rsp, bytes): + if type(rsp) in (bytes, bytearray): # got binary response self.log.info("got binary response for scalar selection") # arr = numpy.frombuffer(rsp, dtype=new_dtype)