I have a problem regarding NumPy arrays.
I cannot get array methods like .T or functions like numpy.concatenate to work with arrays I create:
>>> a=np.array([1,2,3])
>>> a
array([1, 2, 3])
>>> a.T
array([1, 2, 3])
>>> np.concatenate((a,a),axis=0)
array([1, 2, 3, 1, 2, 3])
>>> np.concatenate((a,a),axis=1)
array([1, 2, 3, 1, 2, 3])
>>>
However when I create an array using bult-in functions like rand everything is fine
>>> a=np.random.rand(1,4)
>>> a.T
array([[ 0.75973189],
[ 0.23873578],
[ 0.6422108 ],
[ 0.47079987]])
>>> np.concatenate((a,a),axis=0)
array([[ 0.92191111, 0.50662157, 0.75663621, 0.65802565],
[ 0.92191111, 0.50662157, 0.75663621, 0.65802565]])
Do you think it has to do with element types (int32 vs float64) ?
I anm running python 2.7 on windows 7
Any help would be greatly appreciated.
Thanks !