Re: [Pytables-users] In-kernel searches not returning values?

2013-04-29 Thread Giovanni Luca Ciampaglia
On Mon 29 Apr 2013 01:52:17 PM EDT, 
pytables-users-requ...@lists.sourceforge.net 
wrote:
 Hello Giovanni, This seems to work just fine for me (I am on the current 
 develop branch). scopatz@ares ~/Downloads $ python ipython_log.py [11L] [11L] 
 [11L] So either it is an issue with your machine, your version of pytables or 
 numpy, or something else. If I were you and I needed a stable version, I 
 would 
 wait a week or two for the PyTables v3.0 release and try it again.

Thank Anthony, I will check with PyTables 3.0 and see if the problem persists.

Best,

-- 
Giovanni Luca Ciampaglia

Postdoctoral fellow
Center for Complex Networks and Systems Research
Indiana University

✎ 910 E 10th St ∙ Bloomington ∙ IN 47408
☞ http://cnets.indiana.edu/
✉ gciam...@indiana.edu


--
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
___
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users


Re: [Pytables-users] In-kernel searches not returning values?

2013-04-26 Thread Anthony Scopatz
Hello Giovanni!

This definitely seems like a bug.  How was the column indexed?  Could you
send a sample script that reproduces the problem from start to finish?
Thanks.

Be Well
Anthony


On Fri, Apr 26, 2013 at 6:14 PM, Giovanni Luca Ciampaglia 
glciamp...@gmail.com wrote:

 Hi,

 I am new to PyTables and I like it very much though there are still some
 problems I am trying to solve. The latest is that I am seeing a strange
 behavior
 when using in-kernel searches. The seach condition is a simple equality
 test on
 a single column. Basically, when the column is indexed, in-kernel searches
 don't
 return the expected result, that is:

 In [150]: [ row['visits'] for row in ap.where('rid == 665689') ]
 Out[150]: []

 In [151]: [ row['visits'] for row in ap if row['rid'] == 665689 ]
 Out[151]: [18L]

 When I remove the index, it works again:

 In [153]: ap.cols.rid.removeIndex()

 In [154]: [ row['visits'] for row in ap.where('rid == 665689') ]
 Out[154]: [18L]

 Am I doing something wrong? This is an excerpt of the contents of the file:

 - % h5ls -ld test.h5|head
 AllPages Dataset {529000/Inf}
 Data:
 (0) {year=2008, month=1, day=1, hour=0, minute=0, epoch=1199145600,
 rid=665689,
 (0) visits=18},
 (1) {year=2008, month=1, day=1, hour=0, minute=0, epoch=1199145600, rid=2,
 (1) visits=11},
 (2) {year=2008, month=1, day=1, hour=0, minute=0, epoch=1199145600, rid=12,
 (2) visits=1},
 (3) {year=2008, month=1, day=1, hour=0, minute=0, epoch=1199145600,
 rid=612075,
 (3) visits=8},

 And this is the table description:

 Out[152]:
 /AllPages (Table(529000,), shuffle, zlib(5)) ''
 description := {
 year: UInt16Col(shape=(), dflt=0, pos=0),
 month: UInt8Col(shape=(), dflt=0, pos=1),
 day: UInt8Col(shape=(), dflt=0, pos=2),
 hour: UInt8Col(shape=(), dflt=0, pos=3),
 minute: UInt8Col(shape=(), dflt=0, pos=4),
 epoch: UInt32Col(shape=(), dflt=0, pos=5),
 rid: UInt32Col(shape=(), dflt=0, pos=6),
 visits: UInt32Col(shape=(), dflt=0, pos=7)}
 byteorder := 'little'
 chunkshape := (233016,)
 autoIndex := True
 colindexes := {
 rid: Index(1, light, shuffle, zlib(1)).is_CSI=False}

 Thanks!

 --
 Giovanni Luca Ciampaglia

 Postdoctoral fellow
 Center for Complex Networks and Systems Research
 Indiana University

 ✎ 910 E 10th St ∙ Bloomington ∙ IN 47408
 ☞ http://cnets.indiana.edu/
 ✉ gciam...@indiana.edu



 --
 Try New Relic Now  We'll Send You this Cool Shirt
 New Relic is the only SaaS-based application performance monitoring service
 that delivers powerful full stack analytics. Optimize and monitor your
 browser, app,  servers with just a few lines of code. Try New Relic
 and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
 ___
 Pytables-users mailing list
 Pytables-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pytables-users

--
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr___
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users