You can download this code by clicking the button below.
This code is now available for download.
This function generates a random matrix of shape (arg1, arg2) with values between 0 and 1, based on the two input parameters arg1 and arg2.
Technology Stack : numpy
Code Type : Function
Code Difficulty : Intermediate
import numpy as np
def random_matrix(arg1, arg2):
"""
Generate a random matrix of shape (arg1, arg2) with values between 0 and 1.
"""
return np.random.rand(arg1, arg2)