#21 SVD gives an error: The function (COMMON-LISP:SETF MATLISP:D

closed-fixed
None
5
2012-06-01
2012-05-16
Tzaddi
No

It looks like setf (diag ...) is not defined properly or is not in the correct package. When I run svd with job :a I get:

The function (COMMON-LISP:SETF MATLISP:DIAG) is undefined.

Discussion

  • Tzaddi
    Tzaddi
    2012-05-16

    I found the definition in tensor.lisp, but am not sure why it can't be used in svd.lisp. So, I substituted the expansion in place in the svd method definition and now I get a new error when running svd with job :a

    Arguments X,Y to COPY! are of different dimensions.

    Where I substutite I found the definition in tensor.lisp, but am not sure why it can't be used in svd.lisp. So, I substituted the expansion in place in the svd method definition and now I get a new error when running svd with job :a

    Arguments X,Y to COPY! are of different dimensions.

    Where I substutite (copy! s (diag s1 0)) for (setf (diag s1) s).

     
  • You should be doing:
    (copy! s (diag~ s1 0))

    I'll add a setf-able method to the branch.

    We decided to use "~" (like the "!") to refer to functions
    which give out matrix-slices.

     
    • assigned_to: nobody --> akssri
    • status: open --> open-fixed
     
  • Fixed in the matlisp-cffi branch.

     
    • status: open-fixed --> closed-fixed