Title
Question
<span class="s1">In [</span><span class="s2">110</span><span class="s1">]: from</span><span class="s3"> </span><span class="s4">numpy.linalg</span><span class="s3"> </span><span class="s1">import</span><span class="s3"> det</span>
\r\n<span class="s1"></span>
<span class="s5">In [</span><span class="s2">111</span><span class="s5">]: </span><span class="s1">m5 = matrix([[</span><span class="s5">2</span><span class="s1">,-</span><span class="s5">3</span><span class="s1">,</span><span class="s5">1</span><span class="s1">],[</span><span class="s5">2</span><span class="s1">,</span><span class="s5">0</span><span class="s1">,-</span><span class="s5">1</span><span class="s1">],[</span><span class="s5">1</span><span class="s1">,</span><span class="s5">4</span><span class="s1">,</span><span class="s5">5</span><span class="s1">]])</span>
\r\n<span class="s1">---------------------------------------------------------------------------</span>
\r\n<span class="s6">NameError</span><span class="s1"> <span class="Apple-converted-space"> </span>Traceback (most recent call last)</span>
\r\n<span class="s1"><ipython-input-111-8f370b341908></span><span class="s3"> in </span><span class="s7"><module></span><span class="s8">()</span>
\r\n<span class="s9">----> 1</span><span class="s6"> </span><span class="s3">m5 </span><span class="s1">=</span><span class="s3"> matrix</span><span class="s1">([[</span><span class="s7">2</span><span class="s1">,-</span><span class="s7">3</span><span class="s1">,</span><span class="s7">1</span><span class="s1">],[</span><span class="s7">2</span><span class="s1">,</span><span class="s7">0</span><span class="s1">,-</span><span class="s7">1</span><span class="s1">],[</span><span class="s7">1</span><span class="s1">,</span><span class="s7">4</span><span class="s1">,</span><span class="s7">5</span><span class="s1">]])</span>
\r\n<span class="s1"></span>
<span class="s6">NameError</span><span class="s1">: name 'matrix' is not defined</span>
<span class="s1">
</span>
<span class="s1">Solution - if matrix is replaced with asmatrix it works fine.</span>
Python Matrices 06-07 min 30-40 sec
Login to add comment