LoginSignup
0
1

More than 5 years have passed since last update.

numpy > 特定のインデックスのリストを取得する > idx = np.array([0,2,4]) / print xlist[idx] / print ylist[idx]

Last updated at Posted at 2016-10-22
動作環境
Ubuntu 14.04 LTS desktop amd64
GeForce GTX 750 Ti
ASRock Z170M Pro4S [Intel Z170chipset]
TensorFlow v0.11
cuDNN v5.1 for Linux
CUDA v7.5
Python 2.7.6
IPython 5.1.0 -- An enhanced Interactive Python.

TensorFlowのmnist.pyにあるnext_batch()の代わりにQMCのHalton Sequenceを使う場合、Halton Sequenceで得られるインデックスに位置する要素リストを返す必要がある。

numpyやリストの扱いはまだよくわからないのでやってみた。

参考 http://www.kamishima.net/mlmpyja/nbayes1/ndarray.html
参考 https://docs.scipy.org/doc/numpy-1.10.1/user/basics.indexing.html

ついでにJupyter使ってみた。

qiita.png

idxを一旦np.array()で確保して、それを使えば良いようだ。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1