|
From: Tim H. <tim...@co...> - 2005-08-15 19:04:22
|
Daniel Sheltraw wrote: > Hello All > > Would someone please tell me how to store magnitude data in the first > half of > a previously allocated complex array (I need to save memory). Memory > saving > things like this are so simple and intuitive in C but less so in NumPy. >>> a = 3*na.arange(10) + 4*na.arange(10)*1j >>> na.absolute(a, a.real) >>> a.real array([ 0., 5., 10., 15., 20., 25., 30., 35., 40., 45.]) > > Thanks, > Daniel > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing > & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > > |