From 32f80913467be28a6d38c9d591c239d064fb170c Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Thu, 27 Aug 2009 08:18:52 +0200 Subject: [PATCH] more xarray experiments. Signed-off-by: AJ Rossini --- TODO.lisp | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/TODO.lisp b/TODO.lisp index f2aa3f8..c78f4a5 100644 --- a/TODO.lisp +++ b/TODO.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2009-08-20 07:53:48 tony> +;;; Time-stamp: <2009-08-27 07:52:57 tony> ;;; Creation: <2008-09-08 08:06:30 tony> ;;; File: TODO.lisp ;;; Author: AJ Rossini @@ -38,7 +38,7 @@ (in-package :lisp-stat-unittests) -;; tests = 80, failures = 8, errors = 15 +;; tests = 80, failures = 8, errors = 20 (run-tests :suite 'lisp-stat-ut) (describe (run-tests :suite 'lisp-stat-ut)) @@ -78,17 +78,39 @@ (defparameter *df-test* (make-instance 'dataframe-array - :storage #2A (('a "test0" 0) - ('b "test1" 1) - ('c "test2" 2) - ('d "test3" 3)) + :storage #2A (('a "test0" 0 0d0) + ('b "test1" 1 1d0) + ('c "test2" 2 2d0) + ('d "test3" 3 3d0) + ('e "test4" 4 4d0)) :doc "test reality" - :case-labels (list "0" "1" "2" "3") - :var-labels (list "symbol" "string" "integer"))) + :case-labels (list "0" "1" "2" "3" "4") + :var-labels (list "symbol" "string" "integer" "double-float") + :var-types (list 'symbol 'string 'integer 'double-float))) *df-test* ; but with SBCL, ints become floats? +(defun check-var (df colnum) + (let ((nobs (xdim df 0))) + (dotimes (i nobs) + (check-type (xref df i colnum) (elt (var-types df) i))))) + +(check-var *df-test* 0) + (xref *df-test* 1 2) + +(integerp (xref *df-test* 1 2)) +(floatp (xref *df-test* 1 2)) +(integerp (xref *df-test* 1 3)) +(type-of (xref *df-test* 1 3)) +(floatp (xref *df-test* 1 3)) + +(type-of (vector 1 1d0)) + + + +(loop ) + (xref *df-test* 2 1) (xref *df-test* 0 0) (xref *df-test* 1 0) -- 2.11.4.GIT