|
Re: Reshaing continued: msg#00038python.numeric.general
Karthikesh Raju wrote: A partial support for 3D has been by extending the number of columns in a I am answering from rusty Numeric knowledge, not knowing whether the numarray implementation is different. I think you are mixing up how reshape and how transpose work. "reshape" doesn't actually touch the data; it only changes the size of the different dimensions. Therefore, the order of the data in the array can not be changed by reshape, nor can the number of data points. The transpose method also doesn't touch the actual data, but it changes the strides in which the data are used. transpose can change the order of N-dimensions, not only 2! Both operations are basically O(1), which practically means that they are instantaneous, no matter how large the arrays. After a transpose, the array is normally non-contiguous, which might mean that repeated walk-throughs are significantly slower, and it may pay to make a contiguous copy first. Rob -- Rob W.W. Hooft || rob@xxxxxxxxx || http://www.hooft.net/people/rob/ ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: extracting a random subset of a vector: 00038, Fernando Perez |
|---|---|
| Next by Date: | numarray-->Numeric conversion?: 00038, Francesc Alted |
| Previous by Thread: | Re: Reshaing continuedi: 00038, Stephen Walton |
| Next by Thread: | Re: Reshaing continued: 00038, Warren Focke |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |