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 alignment in complex numbers with exponents #22223

Merged
merged 3 commits into from
Jun 7, 2017
Merged

Conversation

KristofferC
Copy link
Sponsor Member

Ref: #29 (comment) cc @i-apellaniz

Before:

5-element Array{Complex{Float64},1}:
             0.441248-0.279063im  
          0.000860292+0.00161108im
             -16.1468-14.4275im   
 9.75539e-10+8.84465e-10im        
  -1.90441e-5-9.5242e-5im  

After

5-element Array{Complex{Float64},1}:
    0.441248-0.279063im   
 0.000860292+0.00161108im 
    -16.1468-14.4275im    
 9.75539e-10+8.84465e-10im
 -1.90441e-5-9.5242e-5im  

@KristofferC KristofferC added kind:bugfix This change fixes an existing bug domain:complex Complex numbers domain:display and printing Aesthetics and correctness of printed representations of objects. backport pending 0.6 labels Jun 5, 2017
@KristofferC
Copy link
Sponsor Member Author

Bump

test/complex.jl Outdated
@testset "array printing with exponent format" begin
a = [1.0 + 1e-10im, 2.0e-15 - 2.0e-5im, 1.0e-15 + 2im, 1.0 + 2e-15im]
@test sprint((io, x) -> show(io, MIME("text/plain"), x), a) ==
join([
Copy link
Contributor

Choose a reason for hiding this comment

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

indent line continuations, would look clearer

Copy link
Contributor

Choose a reason for hiding this comment

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

this line is also a continuation after the ==

@KristofferC KristofferC merged commit 1e9fb81 into master Jun 7, 2017
@KristofferC KristofferC deleted the kc/complex_print branch June 7, 2017 21:19
tkelman pushed a commit that referenced this pull request Jun 17, 2017
* fix alignment in complex numbers with exponents

* indent

* indent v2

(cherry picked from commit 1e9fb81)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:complex Complex numbers domain:display and printing Aesthetics and correctness of printed representations of objects. kind:bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants