Numpyの練習 100 Numpy Exercises Q16-Q20
前回はこちら 前回記事の続きです。今回は100 numpy execiseのQ16-Q20を解いていきます。 16. How to add a border (filled with 0’s) around an existing array? (既存の配列の周りに0で境界線を追加しなさい) Z = …...
前回はこちら 前回記事の続きです。今回は100 numpy execiseのQ16-Q20を解いていきます。 16. How to add a border (filled with 0’s) around an existing array? (既存の配列の周りに0で境界線を追加しなさい) Z = …...
前回はこちら この記事の続きです。今回は100 numpy exercisesのQ11-Q15を解いていきます。 11. Create a 3×3 identity matrix (3×3の単位行列を作れ) Z = np.eye(3,3) #Z = np.identity(3) print(Z) …...
前回はこちら この記事の続きです。今回は100 numpy exercisesのQ6-Q10を解いていきます。 6. Create a null vector of size 10 but the fifth value which is 1 (サイズ10のゼロベクトルを作れ。ただし5番目の値は1に …...
Numpyが何なのかという説明は他の人の記事に任せるとして、私は今からNumpyの問題集を解いていこうと思います。この問題集は非公式ではありますが、GithubのStarが4.6k,Forkが2.3k(2019.12.30現在)もある非常に有名なチュートリアル的なものです。 私の進め方はまずこのリポ …...