Skip to content

(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

Merged
merged 1 commit into from
May 23, 2019

Conversation

alixdamman
Copy link
Collaborator

No description provided.

@alixdamman alixdamman requested a review from gdementen April 9, 2019 12:05
Copy link
Contributor

@gdementen gdementen left a 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

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)
Copy link
Contributor

@gdementen gdementen May 21, 2019

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:

  1. 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.
  2. 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").
  3. 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.

Copy link
Contributor

@gdementen gdementen left a 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`).
Copy link
Contributor

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 !

Copy link
Contributor

@gdementen gdementen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alixdamman alixdamman merged commit 05573ea into larray-project:master May 23, 2019
alixdamman added a commit to alixdamman/larray that referenced this pull request Jun 7, 2019
alixdamman added a commit to alixdamman/larray that referenced this pull request Aug 5, 2019
alixdamman added a commit to alixdamman/larray that referenced this pull request Aug 5, 2019
alixdamman added a commit to alixdamman/larray that referenced this pull request Aug 26, 2019
alixdamman added a commit to alixdamman/larray that referenced this pull request Sep 23, 2019
alixdamman added a commit to alixdamman/larray that referenced this pull request Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants