Hi All,
I am calling the R from python and giving through two lists of numpy arrays.
Unfortunately, the dimensions of the numpy arrays are not the same as in R. In
the R, two dimension is aggregated – seemingly, artificially.
In python:
print (np.array(ObsBinList[0])).shape
print (np.array(FcBinList[0])).shape
got this:
(46, 92)
(46, 92, 24)
After that:
xhat = robjects.conversion.py2ri(np.array(FcBinConcList))
x = robjects.conversion.py2ri(np.array(ObsBinConcList))
calling the R:
Score = Rfunction(x, xhat)
In the R:
f <- Rfunction(x, xhat) {
print(dim(x[[1]]))
print(dim(xhat[[1]]))
}
got this:
[1] 4232
[1] 4232 24
Have you got any idea, how I can get back the original dimensions in the R
function?
(46, 92)
(46, 92, 24)
I really need to use the original dimensions in the R function.
Any help would be appreciated.
Thank you very much,
Gabi
--
Gabriella Csima Verification scientist
Met Office FitzRoy Road Exeter EX1 3PB United Kingdom
Tel: +44 (0)1392 886398
E-mail:
gabriella.cs...@metoffice.gov.uk<mailto:marion.mitterma...@metoffice.gov.uk>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list