Question: Please Use the NumPy in Python to create a 10 x 10 arrays of zeros and then frame it with a border of ones. x

Please Use the NumPy in Python to create a 10 x 10 arrays of zeros and then "frame" it with a border of ones.

x = np.random.randint(1,size=(10,10))

#This command will give me an 10 x 10 arrays of zeros, but I have no idea how to frame it with 1s easily.

Please provide worked codes to me, thank you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!