csiro-hydroinformatics / c-interop Goto Github PK
View Code? Open in Web Editor NEWReusable functions for marshalling data between C, C++ and other programming languages
License: Other
Reusable functions for marshalling data between C, C++ and other programming languages
License: Other
%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'
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.
Noticed while porting some r unit test in uchronia to the python package. as_native_time_series
for xarray probably works correctly only if the data is passed with the dimension order ens / time. If the dataarray is such that the order is the reverse, it fails to read the right data in the xarray values.
Needs to expand the unit test that covers this.
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"
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()))
)
Need to reuse code among several python packages with C API
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.