PolyMath icon indicating copy to clipboard operation
PolyMath copied to clipboard

PMMatrix >> #asString should be distinct from PMVector >> #asString

Open emdonahue opened this issue 8 years ago • 1 comments

Currently, PMMatrix just prints its contained vectors separated by newlines. This can be misleading:

a := PMMatrix rows: #((1 2)).
b := #(1 2) asPMVector.
a asString = b asString. "true"

However, a 1x2 matrix and a 2-vector are not currently polymorphic. Probably, each should have its own print signature. Maybe a "[<1 2>]" or "<<1 2>>" or "[1 2; ...]" b "<1 2>"

emdonahue avatar May 18 '17 02:05 emdonahue

Can we just create asString for PMMatrix and print something like this:

a := PMMatrix rows: #((1 2)).
a asString.
>>> a PMMatrix(
a PMVector(1 2)
)

AtharvaKhare avatar May 09 '19 07:05 AtharvaKhare