You can download this code by clicking the button below.
This code is now available for download.
This function generates a random matrix of size n x m using the numpy library.
Technology Stack : numpy
Code Type : Function
Code Difficulty : Intermediate
def random_matrix(n, m):
"""
Generate a random matrix of size n x m using the numpy library.
"""
import numpy as np
return np.random.rand(n, m)