Human: how to seperate the matrix to upper triagle. Assistant: 
Here is a Python code to seperate the matrix from the upper triangle

import numpy as np

def upper_triag(matrix):
    """
    Return the upper triagle of a matrix.
    """
    return matrix[np.triu_indices(matrix.shape[0], k=1)]

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

# Calling the function
print((upper_triag(matrix)))

#Example Output
# [2 3 6]

#Remember to inspect code for bugs.