[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] branch master updated: Add docstring for array-shape
From: |
Daniel Llorens |
Subject: |
[Guile-commits] branch master updated: Add docstring for array-shape |
Date: |
Thu, 04 Mar 2021 08:36:08 -0500 |
This is an automated email from the git hooks/post-receive script.
lloda pushed a commit to branch master
in repository guile.
The following commit(s) were added to refs/heads/master by this push:
new bd93eaf Add docstring for array-shape
bd93eaf is described below
commit bd93eaf7cc45d82c7b4ed13d648fd539a31a47b9
Author: Daniel Llorens <lloda@sarc.name>
AuthorDate: Thu Mar 4 14:35:50 2021 +0100
Add docstring for array-shape
---
module/ice-9/boot-9.scm | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 126459d..165fa25 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -869,9 +869,19 @@ VALUE."
;;; {Arrays}
;;;
-(define (array-shape a)
+(define (array-shape array)
+ "Return a list as long as the rank of @var{array}, where each element
+is a two-element list containing the lower and upper bounds of the
+corresponding dimension.
+
+@lisp
+(array-dimensions (make-array 'foo '(-1 3) 5)) @result{} ((-1 3) (0 5))
+@end lisp
+
+See also: @code{array-dimensions}, @code{array-rank}."
+
(map (lambda (ind) (if (number? ind) (list 0 (+ -1 ind)) ind))
- (array-dimensions a)))
+ (array-dimensions array)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] branch master updated: Add docstring for array-shape,
Daniel Llorens <=