-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
842 dump and load scalars of sessions #843
842 dump and load scalars of sessions #843
Conversation
larray/inout/hdf.py
Outdated
res = LGroup(key=key, name=name, axis=axis) | ||
except KeyError: | ||
scalar_key = key | ||
attrs = store.root._v_attrs |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the description of the "obj" argument of the tables.Array class (at http://www.pytables.org/usersguide/libref/homogenous_storage.html#tables.Array), it seems like Python scalars might be natively supported by pytables...
axis = read_hdf(filepath_or_buffer, attrs['axis_key']) | ||
res = LGroup(key=key, name=name, axis=axis) | ||
elif _type in {cls.__name__ for cls in _supported_scalars_types}: | ||
res = pd_obj.values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you should not finish #761 before this PR, because supporting scalars via Pandas is not actually needed. We will need to support them in the "direct"/#761 path anyway and have to support Arrays, Axis and Groups on both (for backward compatibility) be we can skip scalars via Pandas (that would mean a few lines of code fewer to maintain).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it is there, let's finish this. I don't know when I will go back to work on PR #761 (partly because I don't like to work with pytables and prefer h5py but my intuition tells me we need pytables for our case).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought h5py had the same features than pytables with a different API, except for querying (and optionally indexing) tables. And since we wouldn't need either feature, I would think using h5py would not be a problem. That said I never used h5py so I don't know for sure.
In either case, I wouldn't use h5py anyway because pandas relies on pytables and since we will have to keep the current code (using pytables indirectly) for backward compat for a while, depending on both pytables and h5py would be weird.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
OK with the last commit? |
sure |
So, OK to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, LGTM
…ession object (hdf5 + pickle formats)
…ore updating conda
1f4f6db
to
d8a1561
Compare
Thanks for the review. |
No description provided.