numpy.where のインデックス値を使用して、そのインデックスの文字列の内容を出力したいと考えています。配列を 0 から配列の長さまで反復処理することで、これを実行しようとしています。しかし、長さは常に 1..?
import numpy as np
v,w,x, y, z = np.loadtxt('test.txt', dtype=str, delimiter='|',
skiprows=2,usecols=(0,1,2,3,4), unpack=True)
a,b,c, d, e = np.loadtxt('test2.txt', dtype=str, delimiter='|',
skiprows=2,usecols=(0,1,2,3,4), unpack=True)
checkValue = np.in1d(a, v)
missingValue=(np.where(checkValue==False))
print len(missingValue)
for i in range (len(MissingValue)):
print a[i]
これは値を 1 つだけ出力しますが、配列には実際には 10 があります