I did some more testing and view.select seems horribly broken in this regard. I can only get it to work if the view has one column and select(2,4) returns all rows between 0 and 4 (that is the low value always appears to be set to 0). Interestingly, my version of your code works except for the low bug I just described.""" The proper way to get this type of subset is:
subset = view.select(10,19)
indices = view.indices(subset)
"""
import metakit
st = metakit.storage()
vw = st.getas("test[a:I]")
for i in range(10):
vw.append(a=i)metakit.dump(vw) a=vw.select(3,6) metakit.dump(a)
I suggest not using it this way given the bugs I've described :) I'm going to put a recommendation in the annotated docs not to use this form currently. Although there are some reasons why it would be nice if it worked.
i.e. subset = vw[0:10] indices = vw.indices(subset) -> doesn't work
They have only existed for a month or so. I'm always looking for updates and corrections by the way.I created a simple view and tried this and got the traceback. All the docs (the Metakit docs, the PyShell completion tip) indicate that I should be able to call select like this, although it does seem a bit odd from a Python point of view because it is overloading the select method. I think I don't understand the docs.
BTW, your page has been very helpful - I just wish I'd known about it sooner!
Brian
_____________________________________________ Metakit mailing list - [EMAIL PROTECTED] http://www.equi4.com/mailman/listinfo/metakit
