linear-algebra icon indicating copy to clipboard operation
linear-algebra copied to clipboard

Tests for vector inequality are testing sequences

Open mratsim opened this issue 8 years ago • 2 comments

In line 93 to 145 in equality, it's a seq that is tested not the vectors. Is that intended? https://github.com/unicredit/linear-algebra/blob/master/tests/equality.nim#L93

mratsim avatar May 21 '17 18:05 mratsim

I see the same pattern in ops testing: https://github.com/unicredit/linear-algebra/blob/master/tests/ops.nim#L529

mratsim avatar May 21 '17 18:05 mratsim

Yup, dynamic vectors are in fact just seqs: https://github.com/unicredit/linear-algebra/blob/master/linalg/private/types.nim#L24-L25

I saw no good reason not to do this, and I thought that since seqs are so ubiquitous, this might save a few copies here and there

andreaferretti avatar May 22 '17 08:05 andreaferretti