[求助]大家来看看这是python中的什么类型

[求助]大家来看看这是python中的什么类型

请大家看看在下面代码中labels和features是什么类型变量:

labels=concatenate((-ones([1,num]), ones([1,num])),1)[0]
features=concatenate((randn(num,2)-1,randn(num,2)+1),0)

我写了另一段代码从文件中读取数据来创建以上的labels和features,但是发现我创建的类型和上面代码中labels和features的类型不一样,我的代码如下:

readdata.py

features = []
feature = []
labels = []

lines = sys.stdin.readlines()

for line in lines:
    words = string.split(line, ',')
    for word in words:
        if word[0] == 'B' or word[0] == 'M':
            if word[0] == 'B':
                labels.append(1)
            else:
                labels.append(-1)
        else:
            feature.append(string.atof(word))
    features.append(feature)
    feature = []

我是这样用的

cat wdbc.dat | python readdata.py

这个数据文件中每一行数据是像下面这样,有900多行

17.99,10.38,122.8,1001,0.1184,0.2776,0.3001,0.1471,0.2419,0.07871,1.095,0.9053,8.589,153.4,0.006399,0.04904,0.05373,0.01587,0.03003,0.006193,25.38,17.33,184.6,2019,0.1622,0.6656,0.7119,0.2654,0.4601,0.1189,M

不知道我如何才能创建最上面那段代码中的类型来装这些数据
type(labels)
type(features)
那我应该如何用ndarray来装数据呢