Re: [Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread Phillip M. Feldman
I think that I finally figured it out. See code below. Phillip *** Start of myarray.py *** import numpy def array(*args, **kwargs): """This function acts as an interface to numpy.array, accepting multi-row matrices with or without an outer set of enclosing brackets. Usage examples:

Re: [Numpy-discussion] Using interpolate with zero-rank array raises error

2009-07-16 Thread Ralf Gommers
On Thu, Jul 16, 2009 at 12:07 PM, Tony Yu wrote: > Sorry, I don't know if its proper mailing-list-etiquette to bump my > own post... I don't see a problem as long as you wait at least a few days before bumping (which you did). > > > Are there any comments on whether this interp error is expec

Re: [Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread David Warde-Farley
On 16-Jul-09, at 9:34 PM, Phillip M. Feldman wrote: > This does the right thing sometimes, but not always. Out[2] and > Out[4] > are fine, but Out[3] is not (note the extra set of braces). Probably > the only right way to fix this is to modify numpy itself. yes, to achieve out[3] you'd need

Re: [Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread Robert Kern
On Thu, Jul 16, 2009 at 20:34, Phillip M. Feldman wrote: > This does the right thing sometimes, but not always.  Out[2] and Out[4] > are fine, but Out[3] is not (note the extra set of braces).  Probably > the only right way to fix this is to modify numpy itself. Modifying numpy.array() would have

Re: [Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread Phillip M. Feldman
This does the right thing sometimes, but not always. Out[2] and Out[4] are fine, but Out[3] is not (note the extra set of braces). Probably the only right way to fix this is to modify numpy itself. Phillip In [1]: def myarray(*args, **kwargs): return np.array([z for z in args], **kwargs) .

Re: [Numpy-discussion] ANNOUNCEMENT: Enthought Tool Suite (ETS) v3.3.0 released

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 06:13:22PM -0700, Ariel Rokem wrote: >a first for me - upgrading ETS worked - hurray! Dave, _thank you_ for doing the work of releasing and building binaries. Ga�l ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] ANNOUNCEMENT: Enthought Tool Suite (ETS) v3.3.0 released

2009-07-16 Thread Ariel Rokem
Hi - a first for me - upgrading ETS worked - hurray! Just a couple of comments - running: arokem$ easy_install -U "ETS[nonets] == 3.3.0" resulted in the following error: "pkg_resources.UnknownExtra: CodeTools 3.0.0 has no such extra feature 'nonets'" Then, I ran it, calling instead arokem$ easy_i

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread Gökhan SEVER
On Thu, Jul 16, 2009 at 4:30 PM, Fernando Perez wrote: > > If someone has a camera that can do the recordings in a format that > can then be directly recompressed at the command line with something > like mencoder, that would be great. From experience, any recording > mode that requires later man

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread Fernando Perez
Hi all, On Thu, Jul 16, 2009 at 9:00 AM, Peter Alexander wrote: > I really hope someone will take the initiative. This, for me, is the most > interesting of programming conferences; including outside the python > community. > I can't imagine this to be that technically challenging.. I would think.

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread Fons Adriaensen
On Thu, Jul 16, 2009 at 12:27:03PM -0400, Ian Stokes-Rees wrote: > But keep in mind there are costs to running the event, and an associated > registration fee. It seems only fair that any webcasting or recording > only be made available at some cost to the viewers. I would be happy to > pay t

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread David Warde-Farley
On 16-Jul-09, at 11:05 AM, Gael Varoquaux wrote: > On Wed, Jul 15, 2009 at 11:29:27PM -0400, Peter Alexander wrote: >> I sure wish I was able to attend this year's event. >> I'm wondering, and really hoping, if/that the lectures will be >> recorded >> and then posted for the whole communit

[Numpy-discussion] Minor doc crossref problem

2009-07-16 Thread David Warde-Farley
I noticed a few days ago that the cross-reference to 'nonzero' on this: http://docs.scipy.org/doc/numpy/reference/generated/numpy.where.html points to the C API rather than the Python API. I had a quick gander at the Sphinx docs but didn't see anything about how to remedy this. Anyone? Regar

Re: [Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread Keith Goodman
On Thu, Jul 16, 2009 at 1:49 PM, David Warde-Farley wrote: > On 16-Jul-09, at 3:09 PM, Keith Goodman wrote: > >> def myarray(*args, **kwargs): >>    return np.array([z for z in args], **kwargs) > > > This version is better IMHO, because then you can still specify the > dtype by keyword. although (j

Re: [Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread David Warde-Farley
On 16-Jul-09, at 3:09 PM, Keith Goodman wrote: > def myarray(*args, **kwargs): >return np.array([z for z in args], **kwargs) This version is better IMHO, because then you can still specify the dtype by keyword. although (just to be a pedant) > return np.array(args, **kwargs) works as wel

[Numpy-discussion] ANNOUNCEMENT: Enthought Tool Suite (ETS) v3.3.0 released

2009-07-16 Thread Dave Peterson
Hello, I'm pleased to announce that Enthought Tool Suite (ETS) version 3.3.0 has been tagged and released! Please see below for a partial list of changes for this release. PyPi has been updated with the release, including the availability of both Windows binaries (.egg) and source distributio

Re: [Numpy-discussion] Adding new functions to Numpy

2009-07-16 Thread Pauli Virtanen
On 2009-07-16, David Cournapeau wrote: > Hi Pauli, > > On Sat, Jul 4, 2009 at 9:59 PM, Pauli Virtanen wrote: >> Hi, >> >> When you add new functions to Numpy, please include >> >>    .. versionadded:: 1.4.0 > > What is the best way to do this in the reference guide directly as > well (for C API).

Re: [Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread Keith Goodman
On Thu, Jul 16, 2009 at 11:43 AM, Phillip M. Feldman wrote: > numpy.array understands > > V= array([[1,2,3,4],[4,3,2,1]]) > > but not > > V= array([1,2,3,4],[4,3,2,1]) > > It would be more convenient if it could handle either form. You could do something like this: def myarray(*args): return

Re: [Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread David Warde-Farley
On 16-Jul-09, at 2:43 PM, Phillip M. Feldman wrote: > numpy.array understands > > V= array([[1,2,3,4],[4,3,2,1]]) > > but not > > V= array([1,2,3,4],[4,3,2,1]) > > It would be more convenient if it could handle either form. That may be so, but the second argument is dtype. This would break that.

[Numpy-discussion] alternative mechanism for initializing an array

2009-07-16 Thread Phillip M . Feldman
numpy.array understands V= array([[1,2,3,4],[4,3,2,1]]) but not V= array([1,2,3,4],[4,3,2,1]) It would be more convenient if it could handle either form. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listi

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread william ratcliff
I think for PyCon, a lot of the seminars are online for free (even for non attendees). Also, when I've run a workshop, I just asked the speakers to sign a release form to authorize distribution of videos, etc. This would be best to be agreed upon in advance. Personally, for me, conferences are m

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread Ian Stokes-Rees
> The open source community is all about volunteering and with that > being said, I wouldn't expect the conference organizers to necessarily > be involved in the cooridination of such an initiative. > > I almost feel its a duty of someone to pick up the ball and run with it. But keep in mind th

Re: [Numpy-discussion] Using interpolate with zero-rank array raises error

2009-07-16 Thread Tony Yu
Sorry, I don't know if its proper mailing-list-etiquette to bump my own post... Are there any comments on whether this interp error is expected behavior? Thanks, -Tony > Date: Mon, 13 Jul 2009 13:50:50 -0400 > From: Tony Yu > Subject: [Numpy-discussion] Using interpolate with zero-rank arra

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread Peter Alexander
On Thu, Jul 16, 2009 at 11:32 AM, Gökhan SEVER wrote: > > > On Wed, Jul 15, 2009 at 10:29 PM, Peter Alexander wrote: > >> Hi all, >> >> I sure wish I was able to attend this year's event. >> I'm wondering, and really hoping, if/that the lectures will be recorded >> and then posted for the whole co

Re: [Numpy-discussion] Neighbour-frequency matrix

2009-07-16 Thread Stéfan van der Walt
2009/7/15 David Warde-Farley : > Here's an interesting problem, and it might've already been solved by > some of you folks that do image processing: > > Suppose I have an 8-bit integer 2-d array, X, and I want a 256x256 > matrix that tells me how many times a pixel value v was horizontally > (along

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread Gökhan SEVER
On Wed, Jul 15, 2009 at 10:29 PM, Peter Alexander wrote: > Hi all, > > I sure wish I was able to attend this year's event. > I'm wondering, and really hoping, if/that the lectures will be recorded and > then posted for the whole community's benefit? > > thanks, > ~Peter > > ___

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread Ian Stokes-Rees
I too am interested in this option, but for understandable reasons the conference committee aren't able to organize this extra work. I had approached them about it a month ago, but was told some committed volunteer would need to take this on. Since there aren't parallel sessions, a "low-tech"

Re: [Numpy-discussion] Scipy Conference 2009 Lecture Recordings

2009-07-16 Thread Gael Varoquaux
On Wed, Jul 15, 2009 at 11:29:27PM -0400, Peter Alexander wrote: >I sure wish I was able to attend this year's event. >I'm wondering, and really hoping, if/that the lectures will be recorded >and then posted for the whole community's benefit? The problem is that this requires actually

Re: [Numpy-discussion] Adding new functions to Numpy

2009-07-16 Thread David Cournapeau
Hi Pauli, On Sat, Jul 4, 2009 at 9:59 PM, Pauli Virtanen wrote: > Hi, > > When you add new functions to Numpy, please include > >    .. versionadded:: 1.4.0 What is the best way to do this in the reference guide directly as well (for C API). For example, I added the function npy_copysign for 1.4.