[Sbcl-help] The binding of SB-C::Y is not a REAL

0 views
Skip to first unread message

Steven Nunez via Sbcl-help

unread,
Jul 14, 2023, 12:45:39 AM7/14/23
to SBCL Help
Does anyone know why the warning in the subject line is thrown from this code?  I've isolated the error (show below), and looked at the macro expansion, and it seems like this should not be a warning.

(defun %product-vector-array (vector array &optional result)
  "Return the result of the array premultiplied by the vector."
  (loop
    ;; with m-rows = (aops:nrow array) and n-columns = (aops:ncol array) ;; this works
    with (m-rows n-columns) = (array-dimensions array) ;; ERROR IS HERE
    with result = (or result (zero-vector n-columns (array-element-type vector)))
    for column below n-columns
    do (setf (aref result column) (loop
                    for row below m-rows
                    sum (* (aref vector row) (aref array row column))))
    finally (return result)))

    Steve
Reply all
Reply to author
Forward
0 new messages