nichyjt / pe

0 stars 0 forks source link

`Matrix` Simple matrix operations with transpose on the first matrix do not work #6

Open nichyjt opened 1 year ago

nichyjt commented 1 year ago

Description

When the first matrix in the equation is transposed, no operations work as expected.

This limitation is not documented in the UG.

None of the operators appear to be parsed correctly for the first matrix and it will always throw an exception and say that the operator in expression is unknown.

As a user, I would expect that transposing the first matrix would work.

Screenshots & Reproduction

Element-wise operation failing

image.png

Matrix addition failing

image.png

nus-se-bot commented 1 year ago

Team's Response

Issue accepted. Thanks for your bug finding. But I set this issue as very low since the equation you suggested to us should not be executed due to shape mismatch.

So, this issue is more about incorrect exception message which does not hinder user's usage.

Items for the Tester to Verify

:question: Issue severity

Team chose [severity.VeryLow] Originally [severity.High]

Reason for disagreement: Thank you for the report.

I disagree with downgrading this issue to a cosmetic issue. This issue is not about wrong exception message. It is not cosmetic and severely affects normal usage of the Matrix function.

Let me clarify:

Correct inputs still causes exception

The team had dismissed the report due to a faulty example (shape mismatch). They did not do their due diligence to check that even with the correct input, the bug still exists and hinders proper usage of Matrix.

This is the correct user input with the first matrix transposed:

Matrix [1;2].T + [1,2]

image.png

Clearly, even with correct input, the command still fails.

I have established that transposing the first matrix does not work even with correct input. Let me explain why this deserves a high severity.

This bug severely hinders reasonable user usage of Matrix

The average math student (the target user) would need to perform matrix operations where the first matrix of the calculation would need to be transposed. This is a common operation for the target user.

An illustrative example: Consider the widely used least squares solution taught in every linear algebra class.

image.png

The components highlighted in red require the first matrix to be transposed. The target user would quickly realise that the Matrix tool is unusable to perform these fundamental operations.

Hence, this is not about the exception message as claimed, but a faulty feature that does not work as advertised in the user guide.

A possible counterargument is that the user can self-transpose the first matrix, but this is not feasible as it is tedious and the user may make typos, especially if the matrix is very large.

This bug will affect the target user often (first matrix transpose are common and expected to work) and makes the Matrix feature unusable for very common matrix calculations.

Lastly, the pdf user guide implies that the transpose will work regardless of which matrix is being transposed, not highlighting any limitation to the transpose operator.

I hope to have shown how this bug is NOT a cosmetic issue and is in fact a severely limiting bug making Matrix unusable for very common matrix operations that their target user would often need to use.

I hope this clarifies and is a reasonable argument to the team. Thank you!