Fix numpy deprecation warning message for unsigned int conversion

Signed-off-by: Won Jeon <won.jeon@arm.com>
Change-Id: Icac013d42d88534dd1cd71ddb9f47e633a9b51d4
diff --git a/python/serializer/tosa_serializer.py b/python/serializer/tosa_serializer.py
index 86ff936..cbef086 100644
--- a/python/serializer/tosa_serializer.py
+++ b/python/serializer/tosa_serializer.py
@@ -484,17 +484,17 @@
                     u8_data.append(val_u8)
             elif self.dtype == DType.INT8:
                 for val in self.data:
-                    val_u8 = np.uint8(val)
+                    val_u8 = np.array(val).astype(dtype=np.uint8)
                     u8_data.append(val_u8)
             elif self.dtype == DType.INT16:
                 for val in self.data:
-                    val_u16 = np.uint16(val)
+                    val_u16 = np.array(val).astype(dtype=np.uint16)
                     b0 = val_u16 & ByteMask
                     b1 = (val_u16 >> np.uint16(8)) & ByteMask
                     u8_data.extend([b0, b1])
             elif self.dtype == DType.INT32:
                 for val in self.data:
-                    val_u32 = np.uint32(val)
+                    val_u32 = np.array(val).astype(dtype=np.uint32)
                     b0 = val_u32 & ByteMask
                     b1 = (val_u32 >> np.uint32(8)) & ByteMask
                     b2 = (val_u32 >> np.uint32(16)) & ByteMask