Question: import numpy as np a = np.array(1000*sin(arange(64)), dtype='int') a. reshape( (4,4,4)) #print(a) il = np.where(a==-988) i2 = np.where(a==-558) ans = np.array([il[i]+i2[i] for i in range(3)]).
import numpy as np a = np.array(1000*sin(arange(64)), dtype='int') a. reshape( (4,4,4)) #print(a) il = np.where(a==-988) i2 = np.where(a==-558) ans = np.array([il[i]+i2[i] for i in range(3)]). print(ans) IndexError Traceback (most recent call last)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
