Skip to content
Snippets Groups Projects
Commit 0c21cd34 authored by Liam Healy's avatar Liam Healy
Browse files

Create marrays with grid:make-grid

Creating marrays with grid:make-grid would fail because
grid:make-grid-data incorrectly passed a NIL if :initial-element was
not specified.
parent 7c43742f
No related branches found
No related tags found
No related merge requests found
;; A "marray" is an array in both GSL and CL
;; Liam Healy 2008-04-06 21:23:41EDT
;; Time-stamp: <2010-03-13 19:44:21EST marray.lisp>
;; Time-stamp: <2010-03-13 21:35:46EST marray.lisp>
;;
;; Copyright 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -157,11 +157,10 @@
(pushnew 'marray grid:*grid-data-superclasses*))
(defmethod grid:make-grid-data
((type (eql 'marray)) dimensions rest-spec
&key initial-element)
(make-marray (grid:spec-scalar-p rest-spec)
:dimensions dimensions
:initial-element initial-element))
((type (eql 'marray)) dimensions rest-spec &rest keys)
(apply #'make-marray (grid:spec-scalar-p rest-spec)
:dimensions dimensions
keys))
;;; The reader macro #m will read a list of arguments, evaluating the
;;; contents, and construct a marray from it. If the symbol ^ occurs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment