<br><br><div class="gmail_quote">On Tue, Jan 12, 2010 at 10:42 AM, Mirko Vukovic <span dir="ltr"><<a href="mailto:mirko.vukovic@gmail.com">mirko.vukovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am converting some of my code to use grid.<br><br>The following is on clisp & cygwin (my sbcl & linux is behind a firewall, so it takes a bit for me to transfer stuff to them)<br><br>It seems that while `transpose' can handle both arrays and marrays, diagonal can handle only arrays. I traced the execution to `make-specification' in specification.lisp: SYSTEM::LIST-ACCESS: NIL is not a pair.<br>
<br><br>GSL> #m(1 2 3 ^ 4 5 6 ^ 7 8 9)<br>#<MATRIX-DOUBLE-FLOAT #2A((1.0d0 2.0d0 3.0d0) (4.0d0 5.0d0 6.0d0) (7.0d0 8.0d0 9.0d0))><br>GSL> (grid:transpose #m(1 2 3 ^ 4 5 6 ^ 7 8 9))<br>#<MATRIX-DOUBLE-FLOAT #2A((1.0d0 4.0d0 7.0d0) (2.0d0 5.0d0 8.0d0) (3.0d0 6.0d0 9.0d0))><br>
GSL> (grid:diagonal #m(1 2 3 ^ 4 5 6 ^ 7 8 9))<br>; Evaluation aborted.<br>GSL> (grid:transpose (cl-array #m(1 2 3 ^ 4 5 6 ^ 7 8 9)))<br>#2A((1.0d0 4.0d0 7.0d0) (2.0d0 5.0d0 8.0d0) (3.0d0 6.0d0 9.0d0))<br>GSL> (grid:diagonal (cl-array #m(1 2 3 ^ 4 5 6 ^ 7 8 9)))<br>
#(1.0d0 5.0d0 9.0d0)<br>GSL> <br><br>FWIW, in the test suite (tests/compose.lisp), the diagonal tests are on arrays, and not marrays.<br><br>Thanks,<br><font color="#888888"><br>Mirko<br>
</font></blockquote></div><br>I confirmed that `grid:diagonal' operates only on cl-arrays and not on marrays on clisp & sbcl (the latest version of grid, downloaded a few minutes ago). Bug or feature?<br><br>Mirko<br>