numpy.shape gibt inkonsistente Antworten - warum?

Warum funktioniert das Programm

import numpy as np

c = np.array([1,2])
print(c.shape)
d = np.array([[1],[2]]).transpose()
print(d.shape)

geben

(2,)
(1,2)

als Ausgabe? Sollte es nicht

(1,2)
(1,2)

statt? Ich hab das in beiden python 2.7.3 und python 3.2.3

InformationsquelleAutor der Frage user1710403 | 2012-09-30

Schreibe einen Kommentar