[Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-24 Thread Jordi GutiƩrrez Hermoso
I have been instructed to bring this issue to the mailing list: http://projects.scipy.org/numpy/ticket/1994 TIA, - Jordi G. H. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Baffling TypeError using fromfunction with explicit cast

2011-12-24 Thread Thomas Coffee
Nevermind ... did not realize that fromfunction was internally vectorizing the function over arrays. Solution: >>> numpy.fromfunction(lambda i, j: (i*j).astype(numpy.float), (3,4)) array([[ 0., 0., 0., 0.], [ 0., 1., 2., 3.], [ 0., 2., 4., 6.]]) On Sat, Dec 24, 2011 at 7

Re: [Numpy-discussion] PyInt and Numpy's int64 conversion

2011-12-24 Thread Wes McKinney
On Sat, Dec 24, 2011 at 3:11 AM, xantares 09 wrote: > > >> From: wesmck...@gmail.com >> Date: Fri, 23 Dec 2011 12:31:45 -0500 >> To: numpy-discussion@scipy.org >> Subject: Re: [Numpy-discussion] PyInt and Numpy's int64 conversion > >> >> On Fri, Dec 23, 2011 at 4:37 AM, xantares 09 >> wrote: >> >

[Numpy-discussion] Baffling TypeError using fromfunction with explicit cast

2011-12-24 Thread Thomas Coffee
Somewhat new to NumPy, but I've been investigating this for over an hour and found nothing helpful: Can anyone explain why this works ... >>> import numpy >>> numpy.fromfunction(lambda i, j: i*j, (3,4)) array([[ 0., 0., 0., 0.], [ 0., 1., 2., 3.], [ 0., 2., 4., 6.]]) ...

Re: [Numpy-discussion] PyInt and Numpy's int64 conversion

2011-12-24 Thread xantares 09
> From: wesmck...@gmail.com > Date: Fri, 23 Dec 2011 12:31:45 -0500 > To: numpy-discussion@scipy.org > Subject: Re: [Numpy-discussion] PyInt and Numpy's int64 conversion > > On Fri, Dec 23, 2011 at 4:37 AM, xantares 09 wrote: > > Hi, > > > > I'm using Numpy from the C python api side while twe