'numpy.ndarray' object is not callable error in python
<p>I was converting LU decomposition matlab code into python.</p>

<p>But while I was doing it I encountered with this error </p>

<blockquote>
  <p><code>'numpy.ndarray' object is not callable</code></p>
</blockquote>

<p>this error occurs when I tried to test my code. Here is my code and can anyone help with this problem?? I'm waiting for your help.</p>

<pre><code>import numpy as np

def LU(a):
    [m,m]=a.shape

    for k in range(0,m-1,1):
        a[k+1:m-1,k]=a[k+1:m-1,k]/a(k,k)
        a[k+1:m-1,k+1:m-1]=a[k+1:m-1,k+1:m-1]-a[k+1:m-1,k]*a[k,k+1:m-1]
    L=np.eye(m,m)+np.tril(a,-1)
    U=np.triu(a)
    return [L,U]

b=np.array([[1,0,0],[0,1,0],[0,0,1]])

LU(b)
</code></pre>