human
Can you show me a Python code to matplotlib img uint8 to uinth16.
assistant
Here is a Python code to matplotlib img uint8 to uinth16

import numpy as np

def uint8_to_uint16(img):
    """Converts a uint8 image to uint16.
    """
    return img.astype(np.uint16)

# Enter the array
img = np.array([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
                [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])

# Calling the function
print((uint8_to_uint16(img)))

#Example Output
# [[ 1  2  3  4  5  6  7  8  9 10]
#  [ 1  2  3  4  5  6  7  8  9 10]]

#Remember to inspect code for bugs.