juanjosegarciaripoll / tensor

C++ library for numerical arrays and tensor objects and operations with them, designed to allow Matlab-style programming.
Other
51 stars 15 forks source link

Use random tensor sizes in tests #6

Open wavepacket opened 11 years ago

wavepacket commented 11 years ago

Just a comment to not forget it: There was recently a bug in trace() with incorrect calculation of indexes. This was not captured by the unit tests, because it only happened for unsymmetric tensor shapes, while the tests use only equal sizes for all dimensions.

So suggestion: When iterating over tensors of different ranks and sizes in the tests, use unsymmetric (random?) tensor shapes.

juanjosegarciaripoll commented 1 year ago

test_over_tensors() in loops.h now iterates over tensors of different sizes and ranks. Is this what you meant?

wavepacket commented 1 year ago

I am not sure. I can say for certain that the bug mentioned in my original posting referred to commit dfdef4d681e314ce07c2cd58901b7254c5ccd6df, but I cannot fathom what I originally meant here.