Question: I have a 2D numpy array called arr. The current value of row 100001 is [32090, 543]. I need to modify the first value only,

I have a 2D numpy array called arr. The current value of row 100001 is [32090, 543]. I need to modify the first value only, leaving the 543 alone. So the new value of that row would be [46656, 543]. How do you modify only the first element? It tried --> arr[100000]=[46656,] but that just modified both of them --> [46656, 46656]

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!