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

Strange leading zeros in REPL array printing #10908

Closed
mschauer opened this issue Apr 20, 2015 · 6 comments
Closed

Strange leading zeros in REPL array printing #10908

mschauer opened this issue Apr 20, 2015 · 6 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior stdlib:REPL Julia's REPL (Read Eval Print Loop)

Comments

@mschauer
Copy link
Contributor

Something is amiss with the formula used to calculate the number of digits in the entries of an array used in the repl.

julia> [2.,3.]
2-element Array{Float64,1}:
 02.0
 03.0
julia> [2.0,2.3]
2-element Array{Float64,1}:
 02.0
  2.3

Edit:

Julia Version 0.4.0-dev+3967
Commit b8a510d* (2015-03-23 13:19 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3
@tkelman
Copy link
Contributor

tkelman commented Apr 20, 2015

Can you try with latest master? I don't see leading zeros for either of your examples. What platform are you on?

@andreasnoack
Copy link
Member

I've seen this occasionally, but it disappears when Julia is restarted and I don't know what it is triggered by.

@mschauer
Copy link
Contributor Author

You are right, it is intermittent. I would not expect to gain any insight from an update to master and I will wait for the dust from the tuple change to settle before I update julia again.

@PythonNut
Copy link
Contributor

@mschauer as another data point. I don't see any of this on my fresh build of master. Maybe I haven't tried hard enough...

@ihnorton ihnorton added the domain:io Involving the I/O subsystem: libuv, read, write, etc. label May 13, 2015
@JeffBezanson JeffBezanson added kind:bug Indicates an unexpected problem or unintended behavior stdlib:REPL Julia's REPL (Read Eval Print Loop) and removed domain:io Involving the I/O subsystem: libuv, read, write, etc. labels Jul 12, 2015
@mschauer
Copy link
Contributor Author

Recent wild encounter. It happend right after hitting uparrow and modifying one value of R.

julia> R=[1. 1 0
          0 2 0
          0 1 1]
3x3 Array{Float64,2}:
 1.0  1.0  0.0
 0.0  Error showing value of type Array{Float64,2}:
ERROR: ArgumentError: can't repeat a string -1 times
 in repeat at ./strings/types.jl:169
 in print_matrix_row at show.jl:1002
 in print_matrix at show.jl:1046
 in showarray at show.jl:1225
 in anonymous at replutil.jl:29
 in with_output_limit at ./show.jl:1242
 in writemime at replutil.jl:28
 in display at REPL.jl:113
 in display at REPL.jl:116
 in display at multimedia.jl:151
 in print_response at REPL.jl:133
 in print_response at REPL.jl:120
 in anonymous at REPL.jl:621
 in run_interface at ./LineEdit.jl:1586
 in run_frontend at ./REPL.jl:862
 in run_repl at ./REPL.jl:165
 in _start at ./client.jl:453

julia> R=[1. 1 0
          0 2 0
          0 1 1]
3x3 Array{Float64,2}:
 1.0   1.0  0.0
 0.0  02.0  0.0
 0.0   1.0  1.0

@mschauer
Copy link
Contributor Author

Note that this shows both #10908 and #10931 happening in a row non-deterministically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior stdlib:REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

6 participants