[Numpy-discussion] is it a bug?
Wed Mar 11 21:57:42 CDT 2009
On Wed, Mar 11, 2009 at 21:51, Jonathan Taylor
> You lost me on
>> x = np.arange(30)
>> x.shape = (2,3,5)
> For me I get:
> In : x = np.arange(30)
> In : x.shape
> Out: (30,)
> which is what I would expect. Perhaps I missed something?
He is reshaping x by assigning (2,3,5) to its shape tuple, not
asserting that it is equal to (2,3,5) without modification.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion