[Rcpp-commits] r4269 - in pkg/RcppCNPy: . tests vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 21 03:47:19 CET 2013


Author: edd
Date: 2013-02-21 03:47:18 +0100 (Thu, 21 Feb 2013)
New Revision: 4269

Modified:
   pkg/RcppCNPy/DESCRIPTION
   pkg/RcppCNPy/tests/loadFiles.Rout.save
   pkg/RcppCNPy/vignettes/RcppCNPy-intro.Rnw
   pkg/RcppCNPy/vignettes/RcppCNPy-intro.pdf
Log:
updated Description: and vignette regarding the need for -std=c++11 compilation of RcppCNPy (but not Rcpp)
updated test output


Modified: pkg/RcppCNPy/DESCRIPTION
===================================================================
--- pkg/RcppCNPy/DESCRIPTION	2013-02-21 02:23:53 UTC (rev 4268)
+++ pkg/RcppCNPy/DESCRIPTION	2013-02-21 02:47:18 UTC (rev 4269)
@@ -9,8 +9,8 @@
  by Carl Rogers which provides read and write facilities for files created
  with (or for) the NumPy extension for Python.  Vectors and matrices of
  numeric types can be read or written to and from files as well as compressed
- files. Support for integer files is available if the package (and Rcpp) have
- been compiled with -std=c++0x.
+ files. Support for integer files is available if the package has been built
+ with -std=c++0x or -std=c++11 which is needed for long long int support.
 License: GPL (>= 2)
 LazyLoad: yes
 Depends: methods, Rcpp (>= 0.9.13)

Modified: pkg/RcppCNPy/tests/loadFiles.Rout.save
===================================================================
--- pkg/RcppCNPy/tests/loadFiles.Rout.save	2013-02-21 02:23:53 UTC (rev 4268)
+++ pkg/RcppCNPy/tests/loadFiles.Rout.save	2013-02-21 02:47:18 UTC (rev 4269)
@@ -1,5 +1,5 @@
 
-R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
+R version 2.15.2 (2012-10-26) -- "Trick or Treat"
 Copyright (C) 2012 The R Foundation for Statistical Computing
 ISBN 3-900051-07-0
 Platform: x86_64-pc-linux-gnu (64-bit)
@@ -37,20 +37,24 @@
 [3,]  8.8  9.9 11.0 12.1
 > stopifnot(all.equal(fmat, t(matrix(seq(0,11) * 1.1, 4, 3))))
 > 
-> #imat <- npyLoad("imat.npy", "integer")
-> #imat
-> #stopifnot(all.equal(imat, t(matrix(seq(0,11), 4, 3))))
+> if (npyHasIntegerSupport()) {
++     imat <- npyLoad("imat.npy", "integer")
++     imat
++     stopifnot(all.equal(imat, t(matrix(seq(0,11), 4, 3))))
++ }
 > 
 > fvec <- npyLoad("fvec.npy")
 > fvec
 [1] 0.0 1.1 2.2 3.3 4.4
 > stopifnot(all.equal(fvec, seq(0,4) * 1.1))
 > 
-> #ivec <- npyLoad("ivec.npy", "integer")
-> #ivec
-> #stopifnot(all.equal(ivec, seq(0,4)))
+> if (npyHasIntegerSupport()) {
++     ivec <- npyLoad("ivec.npy", "integer")
++     ivec
++     stopifnot(all.equal(ivec, seq(0,4)))
++ }
 > 
 > 
 > proc.time()
    user  system elapsed 
-  0.596   0.024   0.460 
+  0.588   0.024   0.456 

Modified: pkg/RcppCNPy/vignettes/RcppCNPy-intro.Rnw
===================================================================
--- pkg/RcppCNPy/vignettes/RcppCNPy-intro.Rnw	2013-02-21 02:23:53 UTC (rev 4268)
+++ pkg/RcppCNPy/vignettes/RcppCNPy-intro.Rnw	2013-02-21 02:47:18 UTC (rev 4269)
@@ -5,11 +5,14 @@
 
 \usepackage[bf,sf,compact,small]{titlesec}
 
-\usepackage[margin=0.85in,paper=letterpaper]{geometry}
+\usepackage[margin=0.95in,paper=letterpaper]{geometry}
 
 \usepackage[T1]{fontenc}
-\usepackage{pslatex}        % just like RJournal
-\usepackage{palatino,mathpazo}
+%\usepackage{pslatex}        % just like RJournal
+%\usepackage{palatino,mathpazo}
+%% Cf http://www.khirevich.com/latex/font/
+\usepackage[T1]{fontenc}
+\usepackage[bitstream-charter]{mathdesign}
 
 \usepackage{color,url,booktabs}
 
@@ -369,12 +372,13 @@
 
 \subsection{Integer support}
 
-Support for integer data types is conditional on use of the \code{-std=c++0x}
-compiler extension. Only the newer standard supports the \code{long long int}
-type needed to represent \code{int64} data on a 32-bit OS.  So until \R
-switches to allowing \code{-std=c++0x} on CRAN packages, users will need to
-rebuild both \pkg{Rcpp} and \pkg{RcppCNPy} with the switch enabled. As shown
-in the previous examples, integers also transparently convert to float types.
+Support for integer data types is conditional on use of either the
+\code{-std=c++0x} or the newer \code{-std=c++11} compiler extension
+switches. Only the newer standard supports the \code{long long int} type
+needed to represent \code{int64} data on a 32-bit OS.  So until \R allows
+\code{-std=c++0x} on CRAN packages, users will need to rebuild \pkg{RcppCNPy}
+with the switch enabled. As shown in the previous examples, integers also
+transparently convert to float types.
 
 \subsection{Higher-dimensional arrays}
 

Modified: pkg/RcppCNPy/vignettes/RcppCNPy-intro.pdf
===================================================================
(Binary files differ)



More information about the Rcpp-commits mailing list