code: def where_cross(data,threshold):
      
      Is=np.where(data>threshold)[0]
      Is=np.concatenate(([0],Is))
      Ds=Is[:-1]-Is[1:]+1
      return Is[np.where(Ds)[0]+1]
docs: return a list of Is where the data first crosses above threshold.