In NumPy, there are several functions available for random sampling. Here are some commonly used functions:

`np.random.rand()`

or `np.random.random()`

: This function generates random numbers in the range [0, 1) from a uniform distribution. Example:

import numpy as np
# Generate a random number between 0 and 1
random_num = np.random.rand()
print(random_num)

`np.random.random_sample()`

: This function is an alias for `np.random.rand()`

and produces random numbers in the range [0, 1) from a uniform distribution. Example:

import numpy as np
# Generate a random number between 0 and 1
random_num = np.random.random_sample()
print(random_num)

`np.random.randint()`

: This function generates random integers between a specified range. The range is defined by providing the lower bound (inclusive) and the upper bound (exclusive). Example:

import numpy as np
# Generate a random integer between 0 and 9
random_int = np.random.randint(0, 10)
print(random_int)

`np.random.random_integers()`

: This function is similar to `np.random.randint()`

, but it includes the upper bound in the range of possible values. Example:

import numpy as np
# Generate a random integer between 0 and 10
random_int = np.random.random_integers(0, 10)
print(random_int)

In NumPy, there are several functions available for random sampling. Here are some commonly used functions:

`np.random.rand()`

or `np.random.random()`

: This function generates random numbers in the range [0, 1) from a uniform distribution. Example:

import numpy as np
# Generate a random number between 0 and 1
random_num = np.random.rand()
print(random_num)

`np.random.random_sample()`

: This function is an alias for `np.random.rand()`

and produces random numbers in the range [0, 1) from a uniform distribution. Example:

import numpy as np
# Generate a random number between 0 and 1
random_num = np.random.random_sample()
print(random_num)

`np.random.randint()`

: This function generates random integers between a specified range. The range is defined by providing the lower bound (inclusive) and the upper bound (exclusive). Example:

import numpy as np
# Generate a random integer between 0 and 9
random_int = np.random.randint(0, 10)
print(random_int)

`np.random.random_integers()`

: This function is similar to `np.random.randint()`

, but it includes the upper bound in the range of possible values. Example:

import numpy as np
# Generate a random integer between 0 and 10
random_int = np.random.random_integers(0, 10)
print(random_int)

#### Run Code In Live & Test