M2
M2 copied to clipboard
The zero interval and mutable matrices
All of the following code works as expected:
new Matrix from matrix{{span(0)}}
new Matrix from matrix{{span(1)}}
new MutableMatrix from matrix{{span(1)}}
The next line of code produces a matrix with an empty interval and NotANumber endpoints.
new MutableMatrix from matrix{{span(0)}}
I don't know enough about MutableMatrix to know what's going on here.
@mikestillman
My guess is that since MutableMatrix uses a sparse representation, it is eliminating the 0, but failing to recreate the interval when recreating the matrix on the front end. I'm not sure of the right way to fix this, however.