wellposed / hblas

haskell bindings for blas and lapack
www.wellposed.com
BSD 3-Clause "New" or "Revised" License
49 stars 19 forks source link

fix a bug in Show DenseMatrix instance #24

Closed tomasmcz closed 10 years ago

tomasmcz commented 10 years ago

When I tried apply show on a column oriented DenseMatrix, the program got into an infinite loop. Turns out show was checking for stride == xdim and mapDenseMatrix id kept setting it to ydim. I hope this is the correct way to fix that.

cartazio commented 10 years ago

@tomasmcz awesome, and that does look correct!

could you add a tiny itsy bittsy 2x2 example for calling show on a both column row major cases to the unit test suite?

tomasmcz commented 10 years ago

I did a 2x3 example, as 2x2 would not catch the bug I fixed.

cartazio commented 10 years ago

oh, good call! looks good, but i'll double check / review it tomorrow when i'm more awake and merge it in.

Thank you very much, good catch :)