MLBEDSW-2379: Fix 1-element tensors that were marked as scalars

Tensors that are the result of an operation were incorrectly marked
as scalars.

Also fixes a bug for IFM2 of shape [*,*,*,1] in elementwise operations.

Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Change-Id: I82a0e643b12e93c7158e4aca3185415c59033a73
diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py
index 2c77e10..9b0298b 100644
--- a/ethosu/vela/high_level_command_stream.py
+++ b/ethosu/vela/high_level_command_stream.py
@@ -52,6 +52,8 @@
             new_start_coord[-1] = 0
             new_end_coord[-1] = ifm_shape[-1]
 
+        if npu_block_type == NpuBlockType.ElementWise and min(len(new_end_coord), len(ifm_shape)) >= 1:
+            new_end_coord[-1] = min(new_end_coord[-1], ifm_shape[-1])
         if min(len(new_end_coord), len(ifm_shape)) >= 2:
             new_end_coord[-2] = min(new_end_coord[-2], ifm_shape[-2])
         if min(len(new_end_coord), len(ifm_shape)) >= 3: