Skip to content
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

fixed row/col orientation for 2D arrays #1834

Merged
merged 2 commits into from Sep 9, 2012

Conversation

@John-Colvin
Copy link
Contributor

commented Sep 3, 2012

Pytables uses the opposite convention to pandas for row/col. Using the numpy transpose .T corrects for this without copying the data and keeping the orientation of 1D arrays intact.

fixed row/col orientation for 2D arrays
Pytables createArray function uses the opposite convention to pandas
for row/col. Using the numpy transpose .T corrects for this without
copying the data and keeping the orientation of 1D arrays intact.
@John-Colvin

This comment has been minimized.

Copy link
Contributor Author

commented Sep 3, 2012

Is solution for #1824

@John-Colvin

This comment has been minimized.

Copy link
Contributor Author

commented Sep 3, 2012

my apologies, it appears I was a little premature with this pull request as the files it writes can't be read again. Should I close this request or edit it in-place as/when the problem is resolved?

added tranposed attribute, used in _read_array
the transposed attribute keeps track of whether the data has been 
transposed, allowing it to be correctly read by _read_array.
Some minor rearrangement of _read_array was necessary to reduce
duplicate code.
@John-Colvin

This comment has been minimized.

Copy link
Contributor Author

commented Sep 3, 2012

earlier problems are fixed by adding a new _v_attr signalling the transpose has been applied. It's not that pretty, but it's logical and appears to work.

@wesm

This comment has been minimized.

Copy link
Member

commented Sep 7, 2012

Thanks. I think the _v_attr hack also will make it so legacy files can be read

@John-Colvin

This comment has been minimized.

Copy link
Contributor Author

commented Sep 8, 2012

Yes it should do, because it defaults to false if it's not found.

wesm added a commit that referenced this pull request Sep 9, 2012

@wesm wesm merged commit 4ff42db into pandas-dev:master Sep 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.