NumPy is a popular library for working with arrays and numerical computing in Python. Here are some basic operations you can perform with NumPy arrays:

import numpy as np
 
# Create a 2D array
a = np.array([[1, 2, 3], [4, 5, 6]])
 
# Access elements of the array
print(a[0, 0])  # 1
print(a[1, 2])  # 6
 
# Create an array of zeros
b = np.zeros((2, 3))
print(b)
 
# Create an array of ones
c = np.ones((2, 3))
print(c)
 
# Create a diagonal matrix
d = np.diag([1, 2, 3])
print(d)
 
# Reshape an array
e = np.arange(6).reshape((2, 3))
print(e)
 
# Transpose an array
f = e.T
print(f)
 
# Perform element-wise operations
g = np.array([1, 2, 3])
h = np.array([4, 5, 6])
i = g + h
j = g * h
print(i)
print(j)
 
# Compute dot product
k = np.dot(g, h)
print(k)
 
# Compute sum and mean of an array
l = np.array([[1, 2], [3, 4]])
sum_l = np.sum(l)
mean_l = np.mean(l)
print(sum_l)
print(mean_l)

In this example, we first create a 2D array a with 2 rows and 3 columns. We can access elements of the array using the indexing syntax a[i, j].

We can create arrays of zeros or ones using the zeros and ones functions, respectively. We can create a diagonal matrix using the diag function.

We can reshape an array using the reshape method. We can transpose an array using the T attribute.

We can perform element-wise operations on arrays using standard arithmetic operators such as +, -, *, and /. We can also compute the dot product of two arrays using the dot function.

We can compute the sum and mean of an array using the sum and mean functions, respectively.