【发布时间】:2014-07-03 07:50:04
【问题描述】:
我有一本字典
Samples = {5.207403005022627: 0.69973543384229719, 6.8970222167794759: 0.080782939731898179, 7.8338517407140973: 0.10308033284258854, 8.5301143255505334: 0.018640838362318335, 10.418899728838058: 0.14427355015329846, 5.3983946820220501: 0.51319796560976771}
我想将keys 和values 分成2 个numpy 数组。
我试过np.array(Samples.keys(),dtype=np.float),但我收到错误TypeError: float() argument must be a string or a number
【问题讨论】:
标签: python arrays numpy dictionary