Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 854823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:59:10+00:00 2026-05-15T07:59:10+00:00

after having no success with my question on How to use float ** in

  • 0

after having no success with my question on How to use float ** in Python with Swig?, I started thinking that swig might not be the weapon of choice. I need bindings for some c functions. One of these functions takes a float**. What would you recomend? Ctypes?

Interface file:

extern int read_data(const char *file,int *n_,int *m_,float **data_,int **classes_);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:59:11+00:00Added an answer on May 15, 2026 at 7:59 am

    I’ve used ctypes for several projects now and have been quite happy with the results. I don’t think I’ve personally needed a pointer-to-pointer wrapper yet but, in theory, you should be able to do the following:

    from ctypes import *
    
    your_dll = cdll.LoadLibrary("your_dll.dll")
    
    PFloat = POINTER(c_float)
    PInt   = POINTER(c_int)
    
    p_data    = PFloat()
    p_classes = PInt()
    buff      = create_string_buffer(1024)
    n1        = c_int( 0 )
    n2        = c_int( 0 )
    
    ret = your_dll.read_data( buff, byref(n1), byref(n2), byref(p_data), byref(p_classes) )
    
    print('Data:    ', p_data.contents)
    print('Classes: ', p_classes.contents)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading documentation and googling once again and having not success with the dispatching
After having my last question answered , I have never see the preventDefault(); function
After having started a Drag & Drop operation by DragDrop.DoDragDrop(...) no more MouseMove Events
Having noted this question has gone unanswered after a month, I hope I can
After having this issue on our websites over secure SSL connections for Office file
After having a couple of issues getting DQS installed , it appears to be
... after having just read http://www.cocoadev.com/index.pl?CocoaInsecurity ... I am curious to know about your
After having had a dev PC HD corrupt, I'm considering the idea of making
After having worked in MVC for a few months, I'm back in a previously
After having a period of logshipping failures going unnoticed (due to a stopped SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.