Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-26 Thread Francesc Altet
A Dissabte 26 Agost 2006 13:42, Bill Baxter va escriure: > On 8/26/06, Francesc Altet <[EMAIL PROTECTED]> wrote: > > I'm personally an addict to encapsulate as much functionality as possible > > in > > methods (but perhaps I'm biased by an insane use of TAB in ipython > > console). > > You can stil

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-26 Thread Charles R Harris
Hi,On 8/26/06, Keith Goodman <[EMAIL PROTECTED]> wrote: On 8/26/06, Bill Baxter <[EMAIL PROTECTED]> wrote:> On 8/26/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: >> >> > I've come up with adding the functions (not methods at this point)> >> > deletefrom> > insertinto>>> "delete" and "insert" reall

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-26 Thread Keith Goodman
On 8/26/06, Bill Baxter <[EMAIL PROTECTED]> wrote: > On 8/26/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > > > > I've come up with adding the functions (not methods at this point) > > > > deletefrom > > insertinto > > > "delete" and "insert" really would be better. The current "insert" > fun

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-26 Thread Bill Baxter
On 8/26/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: I've come up with adding the functions (not methods at this point)deletefrominsertinto"delete" and "insert" really would be better.   The current "insert" function seems inaptly named.  What it does sounds more like "overlay" or "set_masked". .

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-26 Thread Bill Baxter
On 8/26/06, Francesc Altet <[EMAIL PROTECTED]> wrote: I'm personally an addict to encapsulate as much functionality as possible inmethods (but perhaps I'm biased by an insane use of TAB in ipython console).You can still get tab completion for functions:  numpy. Even if it's your custom to "from num

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-26 Thread Francesc Altet
Hi, A Dissabte 26 Agost 2006 01:55, Robert Kern va escriure: > Travis Oliphant wrote: > > I've come up with adding the functions (not methods at this point) > > > > deletefrom > > insertinto > > > > appendto (syntatic sugar for concatenate but with a separate argument > > for the array and the ex

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Travis Oliphant
Keith Goodman wrote: > On 8/25/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > >> I've come up with adding the functions (not methods at this point) >> >> deletefrom >> insertinto >> >> appendto (syntatic sugar for concatenate but with a separate argument >> for the array and the extra stuff

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Robert Kern
Travis Oliphant wrote: > I've come up with adding the functions (not methods at this point) > > deletefrom > insertinto > > appendto (syntatic sugar for concatenate but with a separate argument > for the array and the extra stuff) --- is this needed? > > These functions will operate along a p

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Keith Goodman
On 8/25/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > I've come up with adding the functions (not methods at this point) > > deletefrom > insertinto > > appendto (syntatic sugar for concatenate but with a separate argument > for the array and the extra stuff) --- is this needed? > > These func

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Sebastian Haase
On Friday 25 August 2006 16:16, Travis Oliphant wrote: > Sebastian Haase wrote: > > On Friday 25 August 2006 08:01, Travis Oliphant wrote: > >> Travis Oliphant wrote: > Now of course: I often needed to "insert" a column, row or section, > ... ? I made a quick and dirty implementation for

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Travis Oliphant
Sebastian Haase wrote: > On Friday 25 August 2006 08:01, Travis Oliphant wrote: > >> Travis Oliphant wrote: >> Now of course: I often needed to "insert" a column, row or section, ... ? I made a quick and dirty implementation for that myself: def insert(arr, i, entry, axis=0)

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Sebastian Haase
On Friday 25 August 2006 08:01, Travis Oliphant wrote: > Travis Oliphant wrote: > >> Now of course: I often needed to "insert" a column, row or section, ... > >> ? I made a quick and dirty implementation for that myself: > >> def insert(arr, i, entry, axis=0): > >> """returns new array with ne

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Travis Oliphant
Travis Oliphant wrote: >> Now of course: I often needed to "insert" a column, row or section, ... ? >> I made a quick and dirty implementation for that myself: >> def insert(arr, i, entry, axis=0): >> """returns new array with new element inserted at index i along axis >> if arr.ndim>1 and

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Travis Oliphant
Sebastian Haase wrote: > On Friday 25 August 2006 07:01, Travis Oliphant wrote: > >> Keith Goodman wrote: >> >>> How do I delete a row (or list of rows) from a matrix object? >>> >>> To remove the n'th row in octave I use x(n,:) = []. Or n could be a >>> vector of rows to remove. >>> >>> In

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Sebastian Haase
On Friday 25 August 2006 07:01, Travis Oliphant wrote: > Keith Goodman wrote: > > How do I delete a row (or list of rows) from a matrix object? > > > > To remove the n'th row in octave I use x(n,:) = []. Or n could be a > > vector of rows to remove. > > > > In numpy 0.9.9.2813 x[[1,2],:] = [] chang

Re: [Numpy-discussion] Deleting a row from a matrix

2006-08-25 Thread Travis Oliphant
Keith Goodman wrote: > How do I delete a row (or list of rows) from a matrix object? > > To remove the n'th row in octave I use x(n,:) = []. Or n could be a > vector of rows to remove. > > In numpy 0.9.9.2813 x[[1,2],:] = [] changes the values of all the > elements of x without changing the size of