Answer to Question #291220 in Python for Naveen Kevin

Question #291220

Note: Set numpy random seed value 100





• Define a random 3-D array x2 of shape (x, y, z) and of numbers between 0 and 1





• Print the value of x2





✓ Sample Case





Sample Input For Custom Testing





3 4 2





Sample Output





[[[0.00568851 0.25242635]





0.01525497]





[0.79566251 [0.59884338 0.60380454]





[0.10514769 0.38194344]]





[[0.03647606





0.89041156]





[0.98092086 8.05994199]





[0.89054594





0.5769015 ]





[0.74247969 0.63018394]]





[[0.58184219





0.02043913]





[8.21002658





0.54468488]





[0.76911517 0.25069523]





[0.28589569





0.85239509]]]

1
Expert's answer
2022-01-27T12:55:00-0500
# Python Program illustrating 
# numpy.random.rand() method 

   

import numpy as geek 


   
# 3D Array      

array = geek.random.rand(2, 2 ,2) 


print("\n\n3D Array filled with random values : \n", array); 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS