numpy.where# numpy.where(condition, [x, y, ]/)# Return elements chosen from x or y depending on condition. Note When only condition is provided, this function is a shorthand for np.asarray(condition).nonzero(). Using nonzero directly should be preferred, as it behaves correctly for subclasses. The rest of this documentation covers only the case where all three arguments are provided. Parameters: c
This tutorial is unfinished. The original authors were not NumPy experts nor native English speakers so it needs reviewing. Please do not hesitate to click the edit button. You will need to create a User Account first. Quick Tour NumPy is a Python library for working with multidimensional arrays. The main data type is an array. An array is a set of elements, all of the same type, indexed by a vec
numpy.roll# numpy.roll(a, shift, axis=None)[source]# Roll array elements along a given axis. Elements that roll beyond the last position are re-introduced at the first. Parameters: aarray_likeInput array. shiftint or tuple of intsThe number of places by which elements are shifted. If a tuple, then axis must be a tuple of the same size, and each of the given axes is shifted by the corresponding num
python での行列・ベクトル数値計算 python で行列ベクトル演算が可能です。でも、実際に行列ベクトル計算をしようとしたとき戸惑わされました。python での行列ベクトル演算について手頃な解説がありませんでした。コード例も殆どなく、試行錯誤で使う必要がありました。回り道をしました。特に Matrix と array の使い分けに戸惑いました。結論は「慣れるまでは Matrix を使わずに array の範囲だけで使っとけ。」です。慣れた後でも Matrix を使うメリットは限られます。array だけで済ましたほうが余分なことを考えずに済みます。 このような遠回りをすることなく python での数値計算を手っ取り早く始められるようにように、この Web page を書きました。C 言語や数値計算についての素養はあるが python は使い始めの方、早急に行列 ベクトル演算を行う
pythonで配列を扱うライブラリとして有名なのはnumpyというものです。 Python はインタプリタ言語であり、数学のアルゴリズムはC言語などのコンパイル言語やJavaなどと比べて低速に動作する場合が多い。NumPy はこうした問題を、多次元配列と、配列を操作する多数の関数や演算子を提供することでこの問題を解こうとしている。これにより、配列や行列の操作として記述できるアルゴリズムは、等価な C のコードとほぼ同等の速度で動作する。 NumPy - Wikipedia とあるように、非常に高速にかつ簡単に行列計算を行なうことができます。 matplotlibは、numpyの行列を処理してグラフの作成をしています。 また、データ処理にも活躍してくれることでしょう。 というわけで、自分がよく使う関数等をまとめておきます。 参考資料 参考になる、参考にしたWebサイトのリストを挙げておきます
パッケージ† pip や easy_install によるインストールの前に多くの外部ライブラリやfortranコンパイラなどが必要になるので,numpy等の科学技術計算パッケージをインストールするには以下のようなパッケージを一般には利用する: 商用(サポートなしなら無料でも利用できる) Anaconda:無料版でもIntel MKLが使える Enthought Canopy フリー Unofficial Windows Binaries for Python Extension Packages (個人ベースの管理で非公式版) ↑ その他† pyvideo.org:PyCon, SciPy, PyData などの講演ビデオリンク集 100 numpy exercises:練習問題 Pythonidae:Python関連のライブラリのリンク集 SciPy Central:SciPy 関連コ
numpy.r_# numpy.r_ = <numpy.lib.index_tricks.RClass object># Translates slice objects to concatenation along the first axis. This is a simple way to build up arrays quickly. There are two use cases. If the index expression contains comma separated arrays, then stack them along their first axis. If the index expression contains slice notation or scalars then create a 1-D array with a range indicate
Compute the qth percentile of the data along the specified axis, while ignoring nan values.
numpy.ravel# numpy.ravel(a, order='C')[source]# Return a contiguous flattened array. A 1-D array, containing the elements of the input, is returned. A copy is made only if needed. As of NumPy 1.10, the returned array will have the same type as the input array. (for example, a masked array will be returned for a masked array input) Parameters: aarray_likeInput array. The elements in a are read in t
Introduction MATLAB® and NumPy/SciPy have a lot in common. But there are many differences. NumPy and SciPy were created to do numerical and scientific computing in the most natural way with Python, not to be MATLAB® clones. This page is intended to be a place to collect wisdom about the differences, mostly for the purpose of helping proficient MATLAB® users become proficient NumPy and SciPy users.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く