Skip to content

Eliminate _dot, which is now easy to inline into Mul#142

Merged
utensil merged 1 commit intopygae:masterfrom
eric-wieser:eliminate-_dot
Dec 8, 2019
Merged

Eliminate _dot, which is now easy to inline into Mul#142
utensil merged 1 commit intopygae:masterfrom
eric-wieser:eliminate-_dot

Conversation

@eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Dec 8, 2019

After the previous PR's removing special cases for scalars (#134, #99), it's now apparent that _dot is a trivial function that can be inlined at its call sites

@codecov
Copy link

codecov bot commented Dec 8, 2019

Codecov Report

Merging #142 into master will decrease coverage by 0.03%.
The diff coverage is 53.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
- Coverage   67.27%   67.23%   -0.04%     
==========================================
  Files           8        8              
  Lines        4776     4774       -2     
==========================================
- Hits         3213     3210       -3     
- Misses       1563     1564       +1
Impacted Files Coverage Δ
galgebra/ga.py 73.63% <53.84%> (-0.15%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e21d5b...9e730c2. Read the comment docs.

The :attr:`dot_mode` attribute determines which of these is used.
"""
return self._dot(A, B, mode=self.dot_mode)
# forbid something silly like setting dot_mode to the wedge or geometric
Copy link
Member

Choose a reason for hiding this comment

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

👍

@utensil utensil merged commit 7a27cdd into pygae:master Dec 8, 2019
@eric-wieser
Copy link
Member Author

Coverage failure looks pretty safe, it's just observing that we never call Mul with mode='>', but all that's skipping is an obvious if statement

@eric-wieser eric-wieser deleted the eliminate-_dot branch December 8, 2019 00:43
@utensil utensil added this to the 0.4.5 milestone Dec 18, 2019
eric-wieser added a commit to eric-wieser/galgebra that referenced this pull request Dec 18, 2019
`_dot` was removed in pygaegh-142, but when inlining, this call site was missed.
utensil pushed a commit that referenced this pull request Dec 18, 2019
`_dot` was removed in gh-142, but when inlining, this call site was missed.
@eric-wieser eric-wieser added the component: core Ga, Mv, Metric, etc label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: core Ga, Mv, Metric, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants