Skip to content

Conversation

@rdeits
Copy link
Collaborator

@rdeits rdeits commented Mar 2, 2018

Polynomials with vector coefficients work just fine, but they can't be displayed because we end up trying to call one(::Vector) just to decide whether to print that coefficient. This PR just makes sure we only use isone for Numbers and just print everything else.

test/show.jl Outdated
@test sprint(show, -(1.0 + 3.1im) * z*x) == "(-1.0 - 3.1im)xz"
@test sprint(show, x^2 + (1.0 + 3.1im) * x) == "x^2 + (1.0 + 3.1im)x"
@test sprint(show, x^2 - (1.0 + 3.1im) * x) == "x^2 + (-1.0 - 3.1im)x"
@test sprint(show, [1.0, 2.0] * x == "([1.0, 2.0])x")
Copy link
Member

Choose a reason for hiding this comment

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

The parenthesis at the end should be between x and ==

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Whoops, good catch. Thanks!

@codecov-io
Copy link

codecov-io commented Mar 4, 2018

Codecov Report

Merging #68 into master will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   79.19%   79.27%   +0.07%     
==========================================
  Files          16       16              
  Lines         519      521       +2     
==========================================
+ Hits          411      413       +2     
  Misses        108      108
Impacted Files Coverage Δ
src/show.jl 100% <100%> (ø) ⬆️

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 14f3f9a...9a7a9ca. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 79.271% when pulling 9a7a9ca on rdeits:show-non-numeric into 14f3f9a on JuliaAlgebra:master.

@blegat blegat merged commit 82cbdcd into JuliaAlgebra:master Mar 4, 2018
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.

4 participants