Initializing a 3D Numpy array with random values in Python

Here are two more methods to initialize a 3-dimensional numpy array of shape (x, y, z) with random values in Python:

1. Using numpy.empty

2. Using numpy.zeros and adding random values

Both methods will create a 3-dimensional numpy array of shape (3, 4, 5) and fill it with random values in the range [0, 1).