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
"-
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
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
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]
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]
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
> 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