Re: [Numpy-discussion] Altering/initializing NumPy array in C

2014-01-02 Thread Bart Baker
You're stack-allocating your array, so the memory is getting recycled for other uses as soon as your C function returns. You should malloc it instead (but you don't have to worry about free'ing it, numpy will do that when the array object is deconstructed). Any C reference will fill you in on

[Numpy-discussion] Quaternion type @ rosettacode.org

2014-01-02 Thread David Goldsmith
Anyone here use/have an opinion about the Quaternion type @ rosettacode.orghttp://rosettacode.org/wiki/Simple_Quaternion_type_and_operations#Python? Or have an opinion about it having derived the type from collections.namedtuple? Anyone have an open-source, numpy-based alternative? Ditto last

Re: [Numpy-discussion] Quaternion type @ rosettacode.org

2014-01-02 Thread Anthony Scopatz
Hello David, There is a numpy-quarterion repo that has served me well in the past. I believe this came out of a SciPy 2011 sprint. See https://github.com/martinling/numpy_quaternion. I hope this helps. Be Well Anthony On Thu, Jan 2, 2014 at 12:29 PM, David Goldsmith

Re: [Numpy-discussion] Quaternion type @ rosettacode.org

2014-01-02 Thread Paul Leopardi
On Thu, 2 Jan 2014 12:29:42 David Goldsmith wrote: Anyone here use/have an opinion about the Quaternion type @ rosettacode.orghttp://rosettacode.org/wiki/Simple_Quaternion_type_and_opera tions#Python? Or have an opinion about it having derived the type from collections.namedtuple? Anyone