[This message bounced (probably because it has been sent from 
unsubscribed address)]

Joon, fancy indexing should work with PyTables 2.2 or higher only.  
Which version are you using?

Francesc

----------  Missatge transmès  ----------

Date: Dimarts 12 Octubre 2010
From: pytables-users-boun...@lists.sourceforge.net
To: pytables-users-ow...@lists.sourceforge.net

> Hi,
> 
> I have a array saved. When I do
> 
> >>> indx = h5file.root.indx
> >>> 
> >>> indx
> 
> /indx (Array(2770002, 3)) ''
> 
>   atom := Int64Atom(shape=(), dflt=0)
>   maindim := 0
>   flavor := 'numpy'
>   byteorder := 'little'
>   chunkshape := None
> 
> But when I try:
> >>> indx[arange(100), :]
> 
> Traceback (most recent call last):
>   File "/usr/lib/wingide3.2/src/debug/tserver/_sandbox.py", line 1,
>   in
> 
> <module>
> 
>   # Used internally for debug sandbox under external interpreter
>   File
> 
> "/home/joon/Programs/EPD/lib/python2.6/site-packages/tables/array.py"
> , line 503, in __getitem__
> 
>   startl, stopl, stepl, shape = self._interpret_indexing(key)
>   File
> 
> "/home/joon/Programs/EPD/lib/python2.6/site-packages/tables/array.py"
> , line 449, in _interpret_indexing
> 
>   key
> 
> TypeError: Non-valid index or slice: [ 0 1 2 3 4 5 6 7 8 9 10 11 12
> 13 14 15 16 17 18 19 20 21 22 23 24
> 
>   25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
>   47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
>   69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
>   91 92 93 94 95 96 97 98
> 
> 99]
> 
> May I ask you what I have done wrong? Can I use numpy array for
> slicing?
> 
> Thank you,
> Joon

-- 
Francesc Alted

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to