MLBEDSW-4539: MEAN axis check exception fix

A recent fix to another MEAN bug introduced a new
bug. The bug was due to some incorrect logic for
checking the axis attribute.

Signed-off-by: Dwight Lidman <dwight.lidman@arm.com>
Change-Id: I65d3486a12e029f7c4450074f03fcd1974f65d8a
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py
index 573b7eb..99d4bf0 100644
--- a/ethosu/vela/graph_optimiser.py
+++ b/ethosu/vela/graph_optimiser.py
@@ -1476,8 +1476,8 @@
         dims = len(shape)
 
         # Height and width axes have different index depending on dimensions
-        if len(axis.shape) <= 1:  # single axis
-            axis = int(axis.values) if len(axis.shape) == 0 else axis.values[0]
+        if axis.shape == [] or axis.shape[0] == 1:  # single axis
+            axis = int(axis.values) if len(axis.shape) == 0 else int(axis.values[0])
             if dims in (2, 3):
                 if axis == 0:
                     h, w = shape[axis], 1