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
Merged

fixed row/col orientation for 2D arrays #1834

merged 2 commits into from Sep 9, 2012

Conversation

John-Colvin
Copy link
Contributor

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.

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

Is solution for #1824

@John-Colvin
Copy link
Contributor Author

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?

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

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
Copy link
Member

wesm commented Sep 7, 2012

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

@John-Colvin
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants