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

Fix broadcasting of DenseAxisArray with scalars #1675

Merged
merged 2 commits into from Dec 13, 2018
Merged

Conversation

blegat
Copy link
Member

@blegat blegat commented Dec 12, 2018

Closes #1455

@mlubin mlubin requested a review from jrevels December 12, 2018 17:23
@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #1675 into master will increase coverage by 1.55%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1675      +/-   ##
==========================================
+ Coverage   67.91%   69.46%   +1.55%     
==========================================
  Files          30       31       +1     
  Lines        3805     4087     +282     
==========================================
+ Hits         2584     2839     +255     
- Misses       1221     1248      +27
Impacted Files Coverage Δ
src/Containers/DenseAxisArray.jl 59.09% <0%> (-0.55%) ⬇️
src/containers.jl 83.78% <0%> (ø)
src/macros.jl 86.05% <0%> (+2.75%) ⬆️

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 af863fe...ac89348. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #1675 into master will increase coverage by 2.1%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1675     +/-   ##
=========================================
+ Coverage   67.91%   70.01%   +2.1%     
=========================================
  Files          30       31      +1     
  Lines        3805     4209    +404     
=========================================
+ Hits         2584     2947    +363     
- Misses       1221     1262     +41
Impacted Files Coverage Δ
src/Containers/DenseAxisArray.jl 59.09% <0%> (-0.55%) ⬇️
src/containers.jl 83.78% <0%> (ø)
src/aff_expr.jl 72.13% <0%> (+0.57%) ⬆️
src/quad_expr.jl 71.73% <0%> (+1.15%) ⬆️
src/objective.jl 94.73% <0%> (+1.4%) ⬆️
src/Containers/SparseAxisArray.jl 67.61% <0%> (+2.68%) ⬆️
src/macros.jl 86.05% <0%> (+2.75%) ⬆️
src/variables.jl 86.26% <0%> (+4.05%) ⬆️

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 af863fe...704d8e0. Read the comment docs.

@test B[2] == 2.0
@test B[3] == 3.0
@test sprint(show, B) == """
for B in [plus1.(A), A .+ 1, 1 .+ A]
Copy link
Member

Choose a reason for hiding this comment

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

  • The printing part only needs to be tested once.
  • IMO the following is more readable:
@test plus1.(A) == correct_answer
@test A .+ 1 == correct_answer
@test 1 .+ A == correct_answer

@blegat blegat added this to the 0.19 milestone Dec 13, 2018
@blegat blegat merged commit 59b0c6f into master Dec 13, 2018
@odow odow deleted the bl/broadcastscalardense branch December 30, 2018 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants