Skip to main content
4
Kuba
  • 137.7k
  • 13
  • 289
  • 751
Post Closed as "Duplicate" by m_goldberg, MarcoB, Feyre, vapor, corey979
edited title
Link
m_goldberg
  • 108.2k
  • 16
  • 104
  • 259

Bug in Unexpected behavior from `NumberForm` of a matix

edited tags
Link
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k
Source Link
Eden Harder
  • 1.1k
  • 6
  • 22

Bug in `NumberForm` of a matix

If I calculate the dimension of the matrix after NumberForm directly, then there will be something wrong

test = NumberForm[IdentityMatrix[2], 2];
test // Dimensions
(*output {2}, but {2,2} is expected*)

If I show the result of NumberForm and then calculate the dimension, the result is right

{{"1","0"},{"0","1"}} //Dimensions
(*ouput {2,2}*)

What causes this? Is it a bug?