Coder Social home page Coder Social logo

csiro-hydroinformatics / c-interop Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 285 KB

Reusable functions for marshalling data between C, C++ and other programming languages

License: Other

C++ 31.55% C 2.74% CMake 2.87% R 6.77% MATLAB 3.99% Batchfile 3.26% Shell 0.03% Makefile 3.49% Python 45.30%
glue-code interop interoperability marshalling-data python rcpp

c-interop's People

Contributors

jmp75 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

plumpmath

c-interop's Issues

Unable to install the R cinterop package on R 3.6.1

%R_VANILLA% CMD INSTALL --build %R_TARBALLS%cinterop_*.tar.gz results in:

 Error in reconcilePropertiesAndPrototype(name, slots, prototype, superClasses,  :
  The prototype for class "RegularTimeSeries" has undefined slot(s): 'TsGeom.Start', 'TsGeom.Length', 'TsGeom.TimeStepSeconds'
Error: unable to load R code in package 'cinterop' 

Use of boost datetime as a default import is problematic

Was trying to compile python bindings that should not need anything to do with boost, but imcluding some non temporal cinterop headers leads to:

Error	LNK1104	cannot open file 'libboost_date_time-vc140-mt-gd-1_62.lib'	

c_cpp_interop.hpp includes some boost/datetime headers. This should be in a separate header, rather than part of the default template declarations.

missing attribute on R dates resulting cinterop::timeseries::make_regular_time_series_geometry_info

  x <- GetSimulationSpan_Pkg_R(subSim)
  # Would like to also test this but there is a puzzling difference. I did not grok the result of str(unclass(x$Start)) given the output of str(x$Start) and attributes(x$Start). 
  # DO NOTE however the difference in date attributes. and the additional tclass on the xts start.
  # expect_equal(x$Start, start(rain))
  # > start(rain)
  # [1] "2002-01-01 UTC"
  # > str(start(rain))
  #  POSIXct[1:1], format: "2002-01-01"
  # > str(x$Start)
  #  POSIXct[1:1], format: "2002-01-01"
  # > str(unclass(start(rain)))
  #  num 1.01e+09
  #  - attr(*, "tzone")= chr "UTC"
  #  - attr(*, "tclass")= chr [1:2] "POSIXct" "POSIXt"
  # > str(unclass(x$Start))
  #  num 1.01e+09
  #  - attr(*, "tzone")= chr "UTC"
  # > attributes(x$Start)
  # $class
  # [1] "POSIXct" "POSIXt" 
  # $tzone
  # [1] "UTC"
  # > attributes(start(rain))
  # $tzone
  # [1] "UTC"
  # $tclass
  # [1] "POSIXct" "POSIXt" 
  # $class
  # [1] "POSIXct" "POSIXt" 

The prototype for class “RegularTimeSeries” has undefined slot(s): 'TsGeom.Start', 'TsGeom.Length', 'TsGeom.TimeStepSeconds'

sessionInfo()

R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Repro with:

setClass('RegularTimeSeriesGeometry', 
  slots = c(
    Start='POSIXct',
    Length='integer',
    TimeStepSeconds='integer'), 
  prototype=c(
    Start=lubridate::origin,
    Length=0,
    TimeStepSeconds=3600)
)
  
setClass('RegularTimeSeries', 
  slots = c(
    TsGeom='RegularTimeSeriesGeometry',
    EnsembleSize='integer',
    NumericData='matrix'), 
  prototype=c(
    TsGeom=new('RegularTimeSeriesGeometry'),
    EnsembleSize=0,
    NumericData=as.matrix(numeric()))
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.