[Gsll-devel] grid:map.lisp -- example code fails

Liam Healy lhealy at common-lisp.net
Sun Mar 28 20:11:58 UTC 2010


Fixed; do a fresh pull on GSD.
Head:       fa26e00108 - In map-n-grids, iterate until "next" source
walker returns nil

Liam

On Wed, Feb 24, 2010 at 10:13 PM, Mirko Vukovic <mirko.vukovic at gmail.com> wrote:
> The following two examples from grid:map.lisp produce an error on
> clisp/cygwin
>
> ;;; Extract the diagonal, inject into a vector of length 6, with the
> ;;; first three elements set to a default value
> (map-grid :source *array-3-4-double-float*
>       :source-affi (affi:diagonal (affi *array-3-4-double-float*))
>       :destination-affi (affi:make-affi '(6) 3)
>       :default-value -77.7d0)
>
> ;;; Extract the diagonal, inject at index 3 into a vector of length 6,
> ;;; adding to the vector elements
> (map-grid :source *array-3-4-double-float*
>       :source-affi (affi:diagonal (affi *array-3-4-double-float*))
>       :destination-affi (affi:make-affi '(6) 3)
>       :default-value -77.7d0
>       :combination-function '+)
>
> The reported error is:
>
> ROW-MAJOR-AREF: index NIL for #2A((#1=0.0d0 1.0d0 2.0d0 3.0d0)
>     (10.0d0 11.0d0 12.0d0 13.0d0)
>     (20.0d0 21.0d0 22.0d0 23.0d0)) is not of type `(INTEGER 0
> (,ARRAY-DIMENSION-LIMIT))
>    [Condition of type SIMPLE-TYPE-ERROR]
>
> I can make it work by using the destination-affi (make-affi '(3)), but not
> (make-affi '(4)) or larger.
>
> Mirko
>
> _______________________________________________
> Gsll-devel mailing list
> Gsll-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
>
>




More information about the gsll-devel mailing list