既存の配列の要素を使用して新しい配列を作成しようとしています。私は取得し続けます:ValueError: Setting void-array with object members using buffer.
import numpy as np
import datetime
date = datetime.date(2013, 4, 5)
results = [(date,0,1,2,3), (date,5,1,5,6), (date,3,4,4,7)]
stock_dt = np.dtype([('date', object),
('open', np.int8),
('high', np.int8),
('low', np.int8),
('close', np.int8)])
d = np.array(results, dtype=stock_dt)
matches = []
for item in d:
if item['high'] == 1:
matches.append(item)
rec = np.array(matches, dtype=stock_dt)
print rec