473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

access ndarray on python side

A previously closed question at

export an array of floats to python

concludes with sturlamolden saying, "Now return myarray and be happy." and Peter Wuertz saying, "Thank you! Thats the complete solution *g*"

This is all good. But I am stuck on the python side where I want to see the array.

I have a c shared library function like
Expand|Select|Wrap|Line Numbers
  1. PyObject *theArray(void)
  2. {
  3.     return PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE, void* data);
  4. }
On the python side I load this library and get this pointer
Expand|Select|Wrap|Line Numbers
  1. thing = mylib.theArray
  2. print thing
thing looks like a _FuncPtr object. What I can't find (bad googler I guess) is a simple example of seeing or indexing the array elements in my python script. Can anyone show or ref python code that shows how the array is accessed?
Aug 22 '14 #1
0 1074

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fahd Khan | last post by:
Hi everyone, I maintain a python utility packaged using py2exe on Windows and I've found that I'm unable to test it on a machine that has python installed. For months I've used coworker's machines...
4
by: Kenneth McDonald | last post by:
I'm curious about this because, quite aside their function as web browsers, it is now possible to build some very useable interfaces using browsers with HTML, CSS, and JavaScript. (The biggest...
7
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I access the client-side filesystem?...
16
by: bobrik | last post by:
Hello, I am using the Python DB API for access to MySQL. But it is not platform-independent - I need a module not included in Python by default - python-mysql, and it uses a compiled binary...
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I access the client-side filesystem?...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I access the client-side filesystem?...
0
by: vinot85 | last post by:
Hello guys, Im new to program with python. i want to access python server side script from a web page. What are the prerequesties for that? Im using apache server. should i change any configuration...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.