python读取TXT文本的时候怎么将其转化为一维数组并知道其数据个数,请各位大神指点下
-1.2609669084400197,0.096703809611975,-1.4770061482288086,0.19815258793350454,0.38039...
-1.2609669084400197,0.096703809611975,
-1.4770061482288086,0.19815258793350454,
0.3803978059763675,0.007308755020072888,
0.5796745892775885,0.2777492799857819,
1.9040559757315971,0.10140225688076443,
1.3802837549402607,0.11774169841066617,
-0.2862906427880853,0.43737390057274217,
就是这样的数据,这么知道有多少个数字,如何将其转化为如下数组
[-3. -1.8 -0.6 0.6 1.8 3. ]
(6,) 展开
-1.4770061482288086,0.19815258793350454,
0.3803978059763675,0.007308755020072888,
0.5796745892775885,0.2777492799857819,
1.9040559757315971,0.10140225688076443,
1.3802837549402607,0.11774169841066617,
-0.2862906427880853,0.43737390057274217,
就是这样的数据,这么知道有多少个数字,如何将其转化为如下数组
[-3. -1.8 -0.6 0.6 1.8 3. ]
(6,) 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询