[Numpy-discussion] Fwd: Request for Use Cases - h5import and text data

2007-08-18 Thread Francesc Altet
Hi, This has been sent to the [EMAIL PROTECTED] list, but it should of interest to NumPy/SciPy lists too. Remember that you can access most of the HDF5 files from Python by using PyTables. Cheers, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-

Re: [Numpy-discussion] fast putmask implementation

2007-08-18 Thread Gael Varoquaux
On Sat, Aug 18, 2007 at 01:51:50AM -0600, Travis Oliphant wrote: > I'm fine with this. Some information on how to make sure emacs (and > other editors) does this would be helpful. Under vim, put in your .vimrc: autocmd FileType python set autoindent tabstop=4 shiftwidth=4 smarttab expandtab Ga

Re: [Numpy-discussion] Non-contiguous array from newaxis indexing

2007-08-18 Thread Travis Oliphant
Jens Jørgen Mortensen wrote: > I would like all these arrays to be contiguous: > import numpy as npy npy.__version__ > '1.0.4.dev3967' x = npy.arange(4) y = x[npy.newaxis, :] z = x.reshape((1, 4)) for a in [x, y, z]: > ... print a.shape, a.strides, a.flags.contigu

Re: [Numpy-discussion] Finding a row match within a numpy array

2007-08-18 Thread Stefan van der Walt
On Tue, Aug 14, 2007 at 11:53:03AM +0100, Andy Cheesman wrote: > Dear nice people > > I'm trying to match a row (b) within a large numpy array (a). My most > successful attempt is below > > hit = equal(b, a) > total_hits = add.reduce(hit, 1) > max_hit = argmax(total_hits, 0) > answer = a[max_hit]

Re: [Numpy-discussion] Finding a row match within a numpy array

2007-08-18 Thread Stefan van der Walt
On Tue, Aug 14, 2007 at 11:53:03AM +0100, Andy Cheesman wrote: > Dear nice people > > I'm trying to match a row (b) within a large numpy array (a). My most > successful attempt is below > > hit = equal(b, a) > total_hits = add.reduce(hit, 1) > max_hit = argmax(total_hits, 0) > answer = a[max_hit]

[Numpy-discussion] Non-contiguous array from newaxis indexing

2007-08-18 Thread Jens Jørgen Mortensen
I would like all these arrays to be contiguous: >>> import numpy as npy >>> npy.__version__ '1.0.4.dev3967' >>> x = npy.arange(4) >>> y = x[npy.newaxis, :] >>> z = x.reshape((1, 4)) >>> for a in [x, y, z]: ... print a.shape, a.strides, a.flags.contiguous ... (4,) (4,) True (1, 4) (0, 4) False

Re: [Numpy-discussion] fast putmask implementation

2007-08-18 Thread Travis Oliphant
> Not any more! See the revised PEP 007, > http://www.python.org/dev/peps/pep-0007/ > > In Python 3000 (and in the 2.x series, in new source files), > we'll switch to a different indentation style: 4 spaces per indent, > all spaces (no tabs in any file). The rest will remain the s