-
Notifications
You must be signed in to change notification settings - Fork 6
(issue 563): bypass cartesian_product_df() when reading a saved LArray object #756
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
Conversation
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.
FWIW, here is what I had done for the same issue
gdementen@0c226a1
9264074
to
01669f2
Compare
larray/inout/pandas.py
Outdated
else: | ||
if sort_rows or sort_columns: | ||
import warnings | ||
warnings.warn('sort_rows and sort_columns are not used when cartesian_prod is set to False', stacklevel=2) |
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 think we can do better than this warning.
There are 3 options here:
- we want to support sort_rows and sort_columns in that case. We could use sort_axes, but I am not in favor of this option.
- we do not want to support it in the long run but want to avoid user code to break (in the case they load a hdf file saved with a new version of larray but the user code still uses sort_columns/rows). In that case we should use sort_axes and issue a deprecation warning with a clear upgrade path ("use sort_axes blahblah instead").
- we do not want to support it in the long run and accept the breakage for our users. In this case, the breakage should be as obvious as possible, i.e. we should throw an explicit error with some clear upgrade path.
I prefer option 3 (because it's easiest and I don't think many users used those arguments) but option 2 is fine with me too.
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.
Note that when I mentioned what I had done for the same issue, I did not expect you to scrap your code and use mine! It was just for your information, in case you could salvage something from it. Now I feel bad about letting you know about my code. It is my fault my code wasn't merged yet, so you shouldn't have to "pay" for that.
@@ -221,6 +221,8 @@ Miscellaneous improvements | |||
* renamed `a_min` and `a_max` arguments of :py:obj:`LArray.clip()` as `minval` and `maxval` respectively | |||
and made them optional (closes :issue:`747`). | |||
|
|||
* improved speed of :py:obj:`read_hdf()` function when reading a stored LArray object (closes :issue:`563`). |
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.
You should add that one must load and re-save their files to benefit for this !
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.
LGTM
…ect is an LArray object
No description provided.