Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109068

Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5

From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5
Date 2016-05-25 02:45 +1000
Message-ID <mailman.60.1464108331.20402.python-list@python.org> (permalink)
References (2 earlier) <CAPTjJmraVH=HLtV1GXec5Mqu+WR5U5sFAHCcNzcypBHy6a6eNw@mail.gmail.com> <mailman.48.1464075943.20402.python-list@python.org> <1837656f-ef9a-4bcf-8074-c9565dd8c59a@googlegroups.com> <5744820e$0$1604$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmrBHWLR5uT8N3Q0KdBBYGC6JVXAx7EvdzH--L3c4TShWQ@mail.gmail.com>

Show all headers | View raw


On Wed, May 25, 2016 at 2:32 AM, Steven D'Aprano <steve@pearwood.info> wrote:
> On Wed, 25 May 2016 02:18 am, Siyi Deng wrote:
>
>> Hello ChrisA,
>> I don't quite understand, the binary shared library contains no python
>> interfaces, it should be independent of python.
>
> In your first post, you said you were using numpy. How is that independent
> of Python?

I'm not certain of the in-memory representation of a numpy array, but
it wouldn't surprise me if it's just a series of consecutive
ints/floats - which would be exactly what a C or Fortran library will
be expecting. So my understanding is that there's some basic ctypes
wrapper code to locate the base address of the array, and then it
passes that straight along.

Of course, without seeing the code....

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-22 20:15 -0700
  Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Fabien <fabien.maussion@gmail.com> - 2016-05-23 11:27 +0200
  Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-23 20:29 +1000
  Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-24 00:15 -0700
    Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Chris Angelico <rosuav@gmail.com> - 2016-05-24 17:45 +1000
      Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-24 09:18 -0700
        Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Chris Angelico <rosuav@gmail.com> - 2016-05-25 02:26 +1000
        Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Steven D'Aprano <steve@pearwood.info> - 2016-05-25 02:32 +1000
          Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Chris Angelico <rosuav@gmail.com> - 2016-05-25 02:45 +1000
          Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-24 10:38 -0700
          Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-05-24 20:14 -0400
  Re: Interfacing a dynamic shared library gives me different results in 2.7 versus 3.5 Siyi Deng <mr.siyi.deng@gmail.com> - 2016-05-24 10:47 -0700

csiph-web