1 2 3 |
<span role="presentation"><span class="cm-keyword">リストを2次元配列にする import</span> <span class="cm-variable">numpy</span> <span class="cm-keyword">as</span> <span class="cm-variable">np</span></span> |
1 |
<span role="presentation"><span class="cm-variable">a</span> = <span class="cm-variable">np</span>.<span class="cm-property">arange</span>(<span class="cm-number">15</span>)</span> |
1 |
<span role="presentation"><span class="cm-variable">b</span>=<span class="cm-variable">a</span>.<span class="cm-property">reshape</span>(<span class="cm-number">3</span>,<span class="cm-number">5</span>)</span> |
1 |
<span role="presentation"></span> |
1 |
<span role="presentation"><span class="cm-builtin">print</span><span class=" CodeMirror-matchingbracket">(</span><span class="cm-variable">b</span><span class=" CodeMirror-matchingbracket">)</span></span> |
1 |
<span role="presentation"></span> |
コメントを残す