Skip to content

Change name of table.cstack to dstack - #9566

Merged
taldcroft merged 1 commit into
astropy:masterfrom
taldcroft:table-cstack-to-dstack
Nov 8, 2019
Merged

taldcroft merged 1 commit into
astropy:masterfrom
taldcroft:table-cstack-to-dstack

Conversation

@taldcroft

Copy link
Copy Markdown
Member

Table.cstack() is short for depth-wise stacking, by analogy to vstack and hstack. I don't quite remember why it got named cstack instead of dstack. I think that table.cstack is conceptually similar to np.dstack : "Stack arrays in sequence depth wise (along third axis)."

Closes #9565

@taldcroft taldcroft added table Affects-dev PRs and issues that do not impact an existing Astropy release no-changelog-entry-needed labels Nov 8, 2019
@taldcroft taldcroft added this to the v4.0 milestone Nov 8, 2019
@bsipocz

bsipocz commented Nov 8, 2019

Copy link
Copy Markdown
Member

You've suggested cstack as "column stack" here #6660 (comment)

I like dstack though, it makes more sense.

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are still a few instances of cstack mentions, but overall it looks good to me.

$ ~/munka/devel/astropy [:2e9e4e78a|⚑ 26] $ grr -i cstack
astropy/modeling/tests/test_separable.py:                                        _cstack, _arith_oper, separability_matrix)
astropy/modeling/tests/test_separable.py:def test_cstack():
astropy/modeling/tests/test_separable.py:    result = _cstack(sh1, scl1)
astropy/modeling/tests/test_separable.py:    result = _cstack(sh1, rot)
astropy/modeling/tests/test_separable.py:    result = _cstack(rot, sh1)
astropy/modeling/separable.py:def _cstack(left, right):
astropy/modeling/separable.py:_operators = {'&': _cstack, '|': _cdot, '+': _arith_oper, '-': _arith_oper,
astropy/table/tests/test_operations.py:class TestCStack():

@taldcroft

Copy link
Copy Markdown
Member Author

I believe all the modeling references are unrelated, but I see there is one that I missed in table testing. That doesn't actually impact anything and we could probably leave it for another time to avoid burning another 2 CPU hours on tests.

@taldcroft
taldcroft merged commit 7c194ec into astropy:master Nov 8, 2019
@taldcroft
taldcroft deleted the table-cstack-to-dstack branch November 8, 2019 23:11
@pllim

pllim commented Nov 9, 2019

Copy link
Copy Markdown
Member

Re: class TestCStack(): -- okay then, I am folding it into #9569 since I am working on that PR anyway.

p.s. Is the parenthesis necessary?

pllim added a commit to pllim/astropy that referenced this pull request Nov 9, 2019
pllim added a commit to pllim/astropy that referenced this pull request Nov 10, 2019
pllim added a commit to pllim/astropy that referenced this pull request Nov 11, 2019
maxnoe pushed a commit to maxnoe/astropy that referenced this pull request Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Affects-dev PRs and issues that do not impact an existing Astropy release no-changelog-entry-needed Ready-for-final-review table

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change table.cstack to table.dstack before 4.0?

3 participants