Title: Problems with datatypes in being passed back correctly in Win 10 64-bit · Issue #16 · cjgb/rPython-win · GitHub
Open Graph Title: Problems with datatypes in being passed back correctly in Win 10 64-bit · Issue #16 · cjgb/rPython-win
X Title: Problems with datatypes in being passed back correctly in Win 10 64-bit · Issue #16 · cjgb/rPython-win
Description: Hello! rPython-win seems to have a lof of potential and it is really fast! However, I have run into a few issues that I figured I'd tell you about. I was able to get rPython working (somewhat) with the minianaconda3 interpreter by modify...
Open Graph Description: Hello! rPython-win seems to have a lof of potential and it is really fast! However, I have run into a few issues that I figured I'd tell you about. I was able to get rPython working (somewhat) with...
X Description: Hello! rPython-win seems to have a lof of potential and it is really fast! However, I have run into a few issues that I figured I'd tell you about. I was able to get rPython working (somewhat) ...
Opengraph URL: https://github.com/cjgb/rPython-win/issues/16
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Problems with datatypes in being passed back correctly in Win 10 64-bit","articleBody":"Hello! rPython-win seems to have a lof of potential and it is really fast! However, I have run into a few issues that I figured I'd tell you about. I was able to get rPython working (somewhat) with the minianaconda3 interpreter by modifying the configure.win as follows:\r\n\r\n```\r\n#!/bin/sh\r\n\r\necho 'PKG_LIBS=-LC:/Users/Mark/Miniconda3/libs -lpython36' \u003e src/makevars.win\r\necho 'PKG_CFLAGS=-I\"C:/Users/Mark/Miniconda3/include\"' \u003e\u003e src/makevars.win\r\n```\r\n\r\nI also have Python 2.7 installed, so I had to make this change. I know that 3.6 was working being I called a script with rPython in R and that script references libraries that I did not have installed in 2.7, and the script ran (no errors about the packages not found). However, it seems only simply variables are being returned in Python. I cannot get ndarrays or pandas data frames returned. For example, I wrote created the following script (\"C:/Users/Mark/PycharmProjects/untitled4/PandasTest.py\"), but noticed that rPython doesn't work quite right (although it does partially work) for the reasons explained below:\r\n\r\n```\r\nimport pandas as pd\r\nimport numpy as np\r\nx1=3333333\r\ndata = np.array([['','Col1','Col2'],\r\n ['Row1',1,2],\r\n ['Row2',3,4]])\r\nx2=pd.DataFrame(data=data[1:,1:],\r\n index=data[1:,0],\r\n columns=data[0,1:])\r\nx3=\"dfaafa\"\r\nx4=[\"a\", \"b\", \"c\"]\r\n```\r\nI call this from R (see below for the specific R details), on Windows 10 Pro, Build 15063.296, using the following script:\r\n\u003e python.load(\"C:/Users/Mark/PycharmProjects/untitled4/PandasTest.py\")\r\n\u003e python.get(\"x1\")\r\n[1] 3333333\r\n\u003e python.get(\"x2\")\r\n[1] 3333333\r\n\u003e python.get(\"x3\")\r\n[1] \"dfaafa\"\r\n\u003e python.get(\"data\")\r\n[1] \"dfaafa\"\r\nx4=[\"a\", \"b\", \"c\"]\r\n\r\n\r\nYou'll notice that rPython seems to return the simple variable types from Python, but it does not seem to be able to transfer back the very important Python dataframe (x2) or the array (data). It's even worse that it returns the wrong values for x2 and data (the last correctly returned value it seems).\r\n\r\nAny ideas on how to fix this? I would love to use this package, but have to resort to PythonInR for now, which is slow and awkward to use.\r\n\r\n```\r\nplatform x86_64-w64-mingw32 \r\narch x86_64 \r\nos mingw32 \r\nsystem x86_64, mingw32 \r\nstatus \r\nmajor 3 \r\nminor 4.0 \r\nyear 2017 \r\nmonth 04 \r\nday 21 \r\nsvn rev 72570 \r\nlanguage R \r\nversion.string R version 3.4.0 (2017-04-21)\r\nnickname You Stupid Darkness \r\n```","author":{"url":"https://github.com/mlamias","@type":"Person","name":"mlamias"},"datePublished":"2017-06-19T07:02:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/16/rPython-win/issues/16"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d439e243-f7a7-5f04-ff43-b1fbec0de7f7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 872E:167984:43B1C:5AB3C:698F8F39 |
| html-safe-nonce | cdd6b640c6d416237215e87bba7788370280fbb95a6532afa9e888a09fac6785 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzJFOjE2Nzk4NDo0M0IxQzo1QUIzQzo2OThGOEYzOSIsInZpc2l0b3JfaWQiOiIxMTg3NzM4MzM2NjQwMzM5NzY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 090ecac97c262e0c85bde21dadab46e268b848aba00aeb9b8d565316c8ec97ed |
| hovercard-subject-tag | issue:236797058 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cjgb/rPython-win/16/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5b999c1ec9b77f4e4683a1ca37889d79adcd58723ce2247bdc09026fe6e48676/cjgb/rPython-win/issues/16 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5b999c1ec9b77f4e4683a1ca37889d79adcd58723ce2247bdc09026fe6e48676/cjgb/rPython-win/issues/16 |
| og:image:alt | Hello! rPython-win seems to have a lof of potential and it is really fast! However, I have run into a few issues that I figured I'd tell you about. I was able to get rPython working (somewhat) with... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mlamias |
| hostname | github.com |
| expected-hostname | github.com |
| None | 202633fd61f7eedb36bb7ccb403f2d581c4331c905abe8ed7a7469c697b51c27 |
| turbo-cache-control | no-preview |
| go-import | github.com/cjgb/rPython-win git https://github.com/cjgb/rPython-win.git |
| octolytics-dimension-user_id | 1321567 |
| octolytics-dimension-user_login | cjgb |
| octolytics-dimension-repository_id | 14503010 |
| octolytics-dimension-repository_nwo | cjgb/rPython-win |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14503010 |
| octolytics-dimension-repository_network_root_nwo | cjgb/rPython-win |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | aa35d2eca6295c64e24dceaa06fde213ad1aed69 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width