|
Confusion regarding Numeric array resizing: msg#00066python.numeric.general
I'm confused by the restriction on resizing arrays demonstrated below: >>> from Numeric import array >>> a = array([0]) >>> a.resize((2,)) >>> b = a >>> a.resize((3,)) Traceback (most recent call last): File "<stdin>", line 1, in ? ValueError: cannot resize an array that has been referenced or is referencing another array in this way. Use the resize function. >>> del b >>> a.resize((3,)) >>> a array([0, 0, 0]) This seems like an unnecessary restriction. Is there a reason I'm missing for it to be in place? Jp ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: fromstring doesn't accept buffer object: 00066, Nadav Horesh |
|---|---|
| Next by Date: | Re: Confusion regarding Numeric array resizing: 00066, David M. Cooke |
| Previous by Thread: | fromstring doesn't accept buffer objecti: 00066, Nadav Horesh |
| Next by Thread: | Re: Confusion regarding Numeric array resizing: 00066, David M. Cooke |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |