[Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread Chad Kidder
I'm trying to enter a 2-D array and np.array() is returning a 1-D array of lists. I'm using Python (x,y) on Windows 7 with numpy 1.7.1. Here's the code that is giving me issues. f1 = [[15.207, 15.266, 15.181, 15.189, 15.215, 15.198], [-45, -57, -62, -70, -72, -73.5, -77]] f1a = np.array(f1)

Re: [Numpy-discussion] Bug (?) converting list to array

2013-09-09 Thread Chad Kidder
what's going on. -n On 9 Sep 2013 14:49, Chad Kidder cckid...@gmail.com wrote: I'm trying to enter a 2-D array and np.array() is returning a 1-D array of lists. I'm using Python (x,y) on Windows 7 with numpy 1.7.1. Here's the code that is giving me issues. f1 = [[15.207, 15.266, 15.181

[Numpy-discussion] Using array mask swaps array axes

2013-10-16 Thread Chad Kidder
, True, True], dtype=bool) using a mask should not change the order of the dimensions. Is there a reason for this behavior, and if so, how do I avoid it in the future? Thanks --Chad Kidder ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Using array mask swaps array axes

2013-10-16 Thread Chad Kidder
Thanks, that works. It will be nice when the original way works also. On Oct 16, 2013 10:28 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Wed, 2013-10-16 at 11:50 -0400, Benjamin Root wrote: On Wed, Oct 16, 2013 at 11:39 AM, Chad Kidder cckid...@gmail.com wrote

Re: [Numpy-discussion] appending extra items to arrays

2007-10-17 Thread Chad Kidder
Growing an array by appending it is the slow way in matlab. The suggested way to do things there is preallocate the array by saying x=zeros() and then referencing the elements in the array and inserting the correct value. --Chad Kidder On Oct 17, 2007, at 7:16 AM, mark wrote: So