Ken Walker
2018-04-03 15:07:53 UTC
I am trying to interpret the documentation about operations that work w/
Mark/Undo:
*Hierarchy manipulation and attribute handling made after a mark can be
undone.*
*Data handling operations can not be undone nor redone.*
Based on my tests, I concluded modifications to a table's data CANNOT be
Undone (data handling?).
However, I can use table.copy(), modify the copy, and the table.copy() can
be Undone (hierarchy manipulation).
Correct?
I ask because I need to modify some values after extracting and before
doing statistical calculations. It is easier to get the data I need with
the PyTables slice and query tools, instead of operating on unstructured
NumPy arrays. Please advise if there's a better way to do this.
*Test #1 (did not work):*
file = tables.open_file()
file.enable_undo()
file.mark()
--makes some changes to the table w/ table.modify_coordinates()--
file.undo()
file.disable_undo()
*Test #2 (works):*
file = tables.open_file()
file.enable_undo()
file.mark()
table.copy()
--makes some changes to the copied table w/ table.modify_coordinates()--
file.undo()
file.disable_undo()
I expected Undo to work on the file created in test 1 based on this
statement from the PyTables doc:
*class tables.File()*
The in-memory representation of a PyTables file.
That means an in-memory representation of the hierarchy and data
structures, but not the data in a PyTables file, right?
(this makes sense given the large data sets PyTables is designed to handle)
Thanks,
-Ken
Mark/Undo:
*Hierarchy manipulation and attribute handling made after a mark can be
undone.*
*Data handling operations can not be undone nor redone.*
Based on my tests, I concluded modifications to a table's data CANNOT be
Undone (data handling?).
However, I can use table.copy(), modify the copy, and the table.copy() can
be Undone (hierarchy manipulation).
Correct?
I ask because I need to modify some values after extracting and before
doing statistical calculations. It is easier to get the data I need with
the PyTables slice and query tools, instead of operating on unstructured
NumPy arrays. Please advise if there's a better way to do this.
*Test #1 (did not work):*
file = tables.open_file()
file.enable_undo()
file.mark()
--makes some changes to the table w/ table.modify_coordinates()--
file.undo()
file.disable_undo()
*Test #2 (works):*
file = tables.open_file()
file.enable_undo()
file.mark()
table.copy()
--makes some changes to the copied table w/ table.modify_coordinates()--
file.undo()
file.disable_undo()
I expected Undo to work on the file created in test 1 based on this
statement from the PyTables doc:
*class tables.File()*
The in-memory representation of a PyTables file.
That means an in-memory representation of the hierarchy and data
structures, but not the data in a PyTables file, right?
(this makes sense given the large data sets PyTables is designed to handle)
Thanks,
-Ken
--
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.