Skip to content

Repeated names - #148

Open
mcabbott wants to merge 1 commit into
JuliaArrays:masterfrom
mcabbott:repeat
Open

Repeated names#148
mcabbott wants to merge 1 commit into
JuliaArrays:masterfrom
mcabbott:repeat

Conversation

@mcabbott

Copy link
Copy Markdown
Collaborator

Maybe it's time to define & test the behaviour with repeated indices. This fixes:

  • sum(A, dims=:i) to use the first dimension named :i, as it already did, and
  • A[i=1] is an error if more than one dimension is named :i. Previously it fixed all such dimensions.

The one exception I can think of is that, for a Diagonal matrix, it may make sense to index both dimensions together. But maybe I have overlooked other uses?

The indexing change did not break any tests. But may still count as a breaking change, not sure.

@codecov

codecov Bot commented Nov 12, 2020

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.76%. Comparing base (1ef0b73) to head (1d3f4c7).
⚠️ Report is 145 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
+ Coverage   93.71%   93.76%   +0.04%     
==========================================
  Files          10       10              
  Lines         382      385       +3     
==========================================
+ Hits          358      361       +3     
  Misses         24       24              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oxinabox

Copy link
Copy Markdown
Member

I know @nickrobinson251 likes for covarience matrixes that indexing with just the keyword gives you on the diagonal.
Not enough to use undefined behavour, but he thinks it is cute

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