(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)))