From b8902ba40ecabd559920ee1d827e039708b3ab43 Mon Sep 17 00:00:00 2001 From: Tom White Date: Tue, 12 Sep 2023 15:56:08 +0100 Subject: [PATCH] Fix case where `shape` is an int for `empty` --- cubed/array_api/creation_functions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cubed/array_api/creation_functions.py b/cubed/array_api/creation_functions.py index 8a4cf7be..a2b758d9 100644 --- a/cubed/array_api/creation_functions.py +++ b/cubed/array_api/creation_functions.py @@ -79,6 +79,7 @@ def asarray( def empty(shape, *, dtype=None, device=None, chunks="auto", spec=None) -> "Array": + shape = normalize_shape(shape) return empty_virtual_array( shape, dtype=dtype, device=device, chunks=chunks, spec=spec, hidden=False )