From c46bed0b553b07d1e56495e09373cce4eefd0125 Mon Sep 17 00:00:00 2001 From: "denis.smirnov" Date: Tue, 10 Aug 2021 11:31:35 -0500 Subject: [PATCH] Fix issue discovered by test tests/test_statistics.py on GPU --- dpnp/dpnp_iface_statistics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dpnp/dpnp_iface_statistics.py b/dpnp/dpnp_iface_statistics.py index a18dfb13af9..408706f5628 100644 --- a/dpnp/dpnp_iface_statistics.py +++ b/dpnp/dpnp_iface_statistics.py @@ -547,7 +547,9 @@ def nanvar(x1, axis=None, dtype=None, out=None, ddof=0, keepdims=False): x1_desc = dpnp.get_dpnp_descriptor(x1) if x1_desc: - if axis is not None: + if x1.size == 0: + pass + elif axis is not None: pass elif dtype is not None: pass