Re: [Numpy-discussion] Fix for ticket #1973

2012-01-16 Thread Bruce Southey
On 01/14/2012 04:31 PM, Charles R Harris wrote: I've put up a pull request for a fix to ticket #1973. Currently the fix simply propagates the maskna flag when the *.astype method is called. A more complicated option would be to add a maskna keyword to specify whether the output is masked or not

Re: [Numpy-discussion] Fix for ticket #1973

2012-01-16 Thread Charles R Harris
On Mon, Jan 16, 2012 at 8:37 AM, Bruce Southey wrote: > ** > On 01/14/2012 04:31 PM, Charles R Harris wrote: > > I've put up a pull request for a fix to ticket #1973. Currently the fix > simply propagates the maskna flag when the *.astype method is called. A > more complicated option would be to

Re: [Numpy-discussion] Fix for ticket #1973

2012-01-16 Thread Charles R Harris
On Mon, Jan 16, 2012 at 8:52 AM, Charles R Harris wrote: > > > On Mon, Jan 16, 2012 at 8:37 AM, Bruce Southey wrote: > >> ** >> On 01/14/2012 04:31 PM, Charles R Harris wrote: >> >> I've put up a pull request for a fix to ticket #1973. Currently the fix >> simply propagates the maskna flag when

Re: [Numpy-discussion] Fix for ticket #1973

2012-01-16 Thread Charles R Harris
On Mon, Jan 16, 2012 at 8:37 AM, Bruce Southey wrote: > ** > On 01/14/2012 04:31 PM, Charles R Harris wrote: > > I've put up a pull request for a fix to ticket #1973. Currently the fix > simply propagates the maskna flag when the *.astype method is called. A > more complicated option would be to

[Numpy-discussion] [ANN] global constrained solver with discrete variables

2012-01-16 Thread Dmitrey
hi all, I've done support of discrete variables for interalg - free (license: BSD) solver with specifiable accuracy, you can take a look at an example here It is written in Python + NumPy, and I hope it's speed will be essentially increased when PyPy (Python with dynamic compilation) support fo

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Benjamin Root
On Sun, Jan 15, 2012 at 6:54 AM, David Cournapeau wrote: > On Sat, Jan 14, 2012 at 11:53 PM, Nathan Faggian > wrote: > > Hi, > > > > I am finding it less than useful to have the negative index wrapping on > nd-arrays. Here is a short example: > > > > import numpy as np > > a = np.zeros((3, 3)) >

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Charles R Harris
On Sat, Jan 14, 2012 at 4:53 PM, Nathan Faggian wrote: > Hi, > > I am finding it less than useful to have the negative index wrapping on > nd-arrays. Here is a short example: > > import numpy as np > a = np.zeros((3, 3)) > a[:,2] = 1000 > print a[0,-1] > print a[0,-1] > print a[-1,-1] > > In all c

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Benjamin Root
On Mon, Jan 16, 2012 at 3:24 PM, Charles R Harris wrote: > > > On Sat, Jan 14, 2012 at 4:53 PM, Nathan Faggian > wrote: > >> Hi, >> >> I am finding it less than useful to have the negative index wrapping on >> nd-arrays. Here is a short example: >> >> import numpy as np >> a = np.zeros((3, 3)) >

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Benjamin Root
On Mon, Jan 16, 2012 at 3:30 PM, Benjamin Root wrote: > > > On Mon, Jan 16, 2012 at 3:24 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Sat, Jan 14, 2012 at 4:53 PM, Nathan Faggian > > wrote: >> >>> Hi, >>> >>> I am finding it less than useful to have the negative index

Re: [Numpy-discussion] Negative indexing.

2012-01-16 Thread Nathan Faggian
Hi, I am sorry for the late reply. Benjamin has hit the nail on the head. I guess I am seeing numpy "fancy indexing" as equivalent to integer based coordinate sampling and trying to compare numpy's fancy indexing to something like map_coordinates in scipy. I have never used np.ravel_multi_index(

Re: [Numpy-discussion] dtype comparison, hash

2012-01-16 Thread Andreas Kloeckner
Hi Robert, On Fri, 30 Dec 2011 20:05:14 +, Robert Kern wrote: > On Fri, Dec 30, 2011 at 18:57, Andreas Kloeckner > wrote: > > Hi Robert, > > > > On Tue, 27 Dec 2011 10:17:41 +, Robert Kern > > wrote: > >> On Tue, Dec 27, 2011 at 01:22, Andreas Kloeckner > >> wrote: > >> > Hi all, > >>