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

Array.dump should allow dumping with column titles but no row labels #1096

Open
gdementen opened this issue Feb 19, 2024 · 0 comments
Open

Comments

@gdementen
Copy link
Contributor

gdementen commented Feb 19, 2024

For DC, it would have helped me to have this functionality. I think I also needed the opposite at some point.

>>> arr = ndtest((2, "c=c0..c2"))
>>> arr
{0}*\c  c0  c1  c2
     0   0   1   2
     1   3   4   5
>>> arr.dump(axes_names=False)
[['', 'c0', 'c1', 'c2'], [0, 0, 1, 2], [1, 3, 4, 5]]
>>> arr.dump(header=False)
[[0, 1, 2], [3, 4, 5]]

I had to use this workaround:

>>> [arr.c.labels.tolist()] + arr.dump(header=False)
[['c0', 'c1', 'c2'], [0, 1, 2], [3, 4, 5]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant