title: How to subtract a value from one of value in a numpy array
body: <p>I have an array from which I need to subtract the a value from one of the value in the array</p>
  
  <p>I followed the suggestion given in this link. But didn't work in my case</p>
  
  <p>My sample code is given below. In this , I wanted to subtract '1' from the second value of array (as mentioned in the function sig2(k).</p>
  
  <p>I have tried as per the below link. But couldn't succeed.</p>
  
  <p>Can some one let me know where am I going wrong</p>
  
  <p><a href="https://stackoverflow.com/questions/45330221/subtract-from-first-value-in-numpy-array">Subtract from first value in numpy array</a> </p>
  
  <pre><code>import numpy as np
  
  k = [1,3]
  coe = np.array([[k[0],k[1]]])
  
  def sig2(k):
      return k[0] * np.power(lam1,((k[1]=-1)))
  
  print(sig2(k))
  </code></pre>