Scientific Computing Tools For Python — Numpy NumPy は Pythonプログラミング言語の拡張モジュールであり、大規模な多次元配列や行列のサポート、これらを操作するための大規模な高水準の数学関数ライブラリを提供する。(via Wikipedia) これまで知識があいまいだったNumPyについて、もう一度おさらいしたいと思います。NumPyはSciPyと併せて科学技術計算でよく利用されています。また、高速に行列演算ができるのでOpenCV(コンピュータビジョンライブラリ)でもNumPyを利用したPythonインタフェースが提供されるようになりました。 OpenCVのPythonバインディングについては去年のエントリーでも取り上げていますので参考までに。 * さくらVPSにOpenCVをインストールしてPythonから使う [2017/04/2
pythonは、数値データの分析を行うのに非常に便利な言語であるが、データの分析を行うまず第一歩として、データを読み込まなければならない。 そこで、様々な形式の数値データをnumpy配列の形式で読み込む方法をまとめる。 以下、全ての場合においてファイルの中身を'data'の中に格納する。 csv(テキスト)ファイルの読み込み year,Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec 2001,-0.4,-0.3,-0.2,-0.1,0,0,-0.1,-0.2,-0.3,-0.4,-0.5,-0.4 2002,-0.3,-0.1,0,0.3,0.4,0.5,0.6,0.7,0.8,1,1,1 2003,0.8,0.5,0,-0.2,-0.2,-0.2,-0.1,0.1,0.3,0.4,0.4,0.4 2004,0.4,0.3,0.1,0,-0.
Over Thanksgiving I finally got around to releasing the Python Shapefile Library. It is a single file of pure Python with no dependencies. It reads and writes shp, shx, and dbf for all 15 types of shapefiles in a pythonic way. You can find it with documentation here in the CheeseShop or search for "pyshp" on Google Code. This library simply reads and writes shapefiles with no support for geometry
Verified details These details have been verified by PyPI Maintainers jlawhead kbahgat Unverified details These details have not been verified by PyPI Project links Homepage Download GitHub Statistics View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery Meta License: MIT Author: Joel Lawhead Maintainer: Karim Bahgat Tags gis, geospatial, geographic,
パッケージ† 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 関連コ
memoring コンピュータを研究に使うための私的メモ。Python、Fortran、Ubuntu、etc... トップページページ一覧メンバー掲示板編集 array 最終更新: miyacdoor 2013年01月29日(火) 19:19:40履歴 Tweet array 属性 shapと要素の並び方 型 配列の生成 基本 格子点型配列の作成 配列の変形 結合・分割 繰り返し 挿入・削除 形状の変更 転置 universal function 配列に対する演算 縮約/拡大 reduce accumulate outer reduceat ブロードキャスト インデキシング スライス 整数配列によるFancy Indexing 論理型配列によるFancy Indexing メソッド 配列の並び替え・検索 並び替え 検索 多次元配列の最大/最小の場所を求める。 その他 マスクの設定 arra
ファイルをオープンして内容を出力する >>> f = open("foo.txt") >>> for line in f: ... print(line,end="") ... SPAM Egg Bacon Sausage >>> f.close() >>> with open("foo.txt") as f: ... for line in f: ... print(line,end="") ... SPAM Egg Bacon Sausage ファイルの内容を読み込む >>> f = open("foo.txt") >>> f.read() 'SPAM\nEgg\nBacon\nSausage\n' >>> f.close() >>> f = open("foo.txt") >>> f.read(10) 'SPAM\nEgg\nB' >>> f.close() ファイルを一行ずつ読み込
linecache モジュールは、Python のソースファイルを扱うときに Python 標準ライブラリ全体で広く使用されています。そのキャッシュの実装は、メモリ内のディクショナリへ解析した行単位で、単純にファイルのコンテンツを保持します。その API はリストにインデクシングすることで要求された行を返します。これにより、ファイルを(何回も)読み込んでから、必要な部分を見つけるために行を解析する時間を節約します。特にエラーリポートのためにトレースバック情報を生成するようなときに、同じファイルから複数行を探すと便利です。 import os import tempfile lorem = '''Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget elit. In posuere mi non risu
You are reading an old version of the documentation (v2.0.2). For the latest version see https://matplotlib.org/stable/
Pythonでグラフを出力したくて、いいライブラリがないか調べていると この記事を見つけました。 pythonのグラフ作成ツールmatplotlibを使ってみたメモ matplotlibを使ってみることにしました。 http://matplotlib.org/ インストール matplotlibをUbuntu 14.04にインストールしてみます。 こちらを参考に、apt-getでインストールしました。 http://matplotlib.org/1.3.1/users/installing.html 単純なグラフ 使い方を学ぶため、こちらを写経していきます。 Matplotlib サンプル集 # -*- coding: utf-8 -*-import pylab# -10 から 10 まで 0.1 刻みの配列をつくる (numpy.arange )x = pylab.arange(-10.
Welcome! This is the documentation for Python 2.7.18. Parts of the documentation: What's new in Python 2.7? or all "What's new" documents since 2.0 Tutorial start here Library Reference keep this under your pillow Language Reference describes syntax and language elements Python Setup and Usage how to use Python on different platforms Python HOWTOs in-depth documents on specific topics Installing P
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く