<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user">
    <title>gmane.comp.python.cython.user</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6443"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6442"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6441"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6440"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6439"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6438"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6437"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6436"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6435"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6434"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6433"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6432"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6431"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6430"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6429"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6428"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6427"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6426"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6425"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.cython.user/6424"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6443">
    <title>Re: Re: Iterating over array of arbitrary rank</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6443</link>
    <description>&lt;pre&gt;
which probably is specialized under the hood for each specific type. I
suppose 0 is a special case as all types represent 0 the same way, but
I'm not sure how easy it would be to take advantage of that.


You could always do (x + 1).nonzero() and (x - 1).nonzero(). Not the
most efficient of course. If fused types aren't an option use a big
if-elif-elif-elif-... block or a templating library to generate your
code (which is exactly what fused types does for you).


&lt;/pre&gt;</description>
    <dc:creator>Robert Bradshaw</dc:creator>
    <dc:date>2012-05-22T05:20:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6442">
    <title>Re: Re: Iterating over array of arbitrary rank</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6442</link>
    <description>&lt;pre&gt;
The trick here is the arbitrary numerical type -- Cython is a static
language (or the C it compiles to is), so you need code for each type.


why not -- that is the kind of thing they are good for.

Anyway -- one option is to write some kind of code generator that is
essentially a big if-elif block for each type you want to support.
That really wouldn't be that big a deal.

You may want to look at the "bottleneck" project -- they used a
templating system to generate type specific code for numpy arrays.

I've got some sample code that might get you started, too, though it's
not in the least bit elegant.

-Chris









&lt;/pre&gt;</description>
    <dc:creator>Chris Barker</dc:creator>
    <dc:date>2012-05-22T04:33:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6441">
    <title>Re: Iterating over array of arbitrary rank</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6441</link>
    <description>&lt;pre&gt;Thank you for the pointer. I have found an example using numpy's new
iterator:
http://docs.scipy.org/doc/numpy/reference/c-api.iterator.html#simple-iteration-example

Now, what I want to do is the following:
- take an array of arbitrary numerical dtype
- loop over the array
- count how many -1, 0, +1 values there are
- if there are other values, stop the iteration and bail

Numpy arrays have specialised nonzero function, but I wonder what's
the best way to efficiently test for 1 and -1 values in cython (fused
type is not an option).

Pierre

On 14 mai, 09:23, Dag Sverre Seljebotn &amp;lt;d.s.seljeb...&amp;lt; at &amp;gt;astro.uio.no&amp;gt;
wrote:

&lt;/pre&gt;</description>
    <dc:creator>pch</dc:creator>
    <dc:date>2012-05-22T00:15:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6440">
    <title>Re: Excellent performance with Cython for subclassed list</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6440</link>
    <description>&lt;pre&gt;On Thu, May 17, 2012 at 8:45 AM, Oscar Benjamin
&amp;lt;oscar.j.benjamin&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

Incidentally, I just merged it.

- Robert

&lt;/pre&gt;</description>
    <dc:creator>Robert Bradshaw</dc:creator>
    <dc:date>2012-05-20T08:28:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6439">
    <title>Re: Excellent performance with Cython for subclassed list</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6439</link>
    <description>&lt;pre&gt;Hi Oscar,

I would like to use 'newarrayobject' function defined in arrayarray.h in an 
python c api module. Not much into c/c++.
The python equivalent code is:

myarray = array('B', 1000)
for i in xrange(0, 1000)
    myarray[i] = i
return myarray

Could you please tell me how do I implement this using 'newarrayobject' in 
C. I would really appreciate.

Cheers

Prashant

&lt;/pre&gt;</description>
    <dc:creator>Prashant</dc:creator>
    <dc:date>2012-05-20T07:24:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6438">
    <title>Re: crash with free() under windows</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6438</link>
    <description>&lt;pre&gt;
You're absolutely right (I think!). I can fix the problem by compiling a
dll that wraps free() and is compiled with the same flags as the library
that calls malloc() used. If I then call that wrapper around free()
everything is hunky dory.

The next problem is to work out how to link a single function against a
particular msvcrt... (effective namespaces might be useful here!)

Cheers,

Henry



&lt;/pre&gt;</description>
    <dc:creator>Henry Gomersall</dc:creator>
    <dc:date>2012-05-19T21:42:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6437">
    <title>Re: crash with free() under windows</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6437</link>
    <description>&lt;pre&gt;
I very much doubt this is a Cython bug, and the code looks too trivial
to have any platform dependence in it. I wonder if you're linking
against a different memory manager when you build the shared libraries
(and build Python for that matter).

Compilers do tricky things sometimes with malloc and free, but you
could try printing out the addresses of these functions in your
library and in your cython file and seeing if they even agree.

- Robert

&lt;/pre&gt;</description>
    <dc:creator>Robert Bradshaw</dc:creator>
    <dc:date>2012-05-19T07:58:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6436">
    <title>Re: crash with free() under windows</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6436</link>
    <description>&lt;pre&gt;
This very much strikes me as a Cython bug. I'm keen to work to get to
the bottom of it, but in the mean time presumably I should submit this
as a ticket?

Otherwise, might this be something I am doing wrongly?

Cheers,

Henry


&lt;/pre&gt;</description>
    <dc:creator>Henry Gomersall</dc:creator>
    <dc:date>2012-05-19T07:49:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6435">
    <title>Re: Unable to Reference Other Class Variables?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6435</link>
    <description>&lt;pre&gt;You're using double underscores in your attribute names. IIRC, we now
mangle them as Python does. Try using single underscores instead (or
the full mangled name, which is quite ugly).

On Thu, May 17, 2012 at 1:32 PM, Shaun Taylor &amp;lt;shaun.taylor&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Robert Bradshaw</dc:creator>
    <dc:date>2012-05-18T19:39:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6434">
    <title>Re: Excellent performance with Cython for subclassed list</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6434</link>
    <description>&lt;pre&gt;When I give multiply and add methods to the arraym class, it turns out to 
be slightly faster than numpy.ndarray for arrays with up to around 10000 
elements and much faster at smaller sizes (~10 elements). The ~5x speedup 
when using small arrays would be very useful in many cases (e.g. for ODE 
solvers).

I may start using the code from pull request 113 in my own simulations, but 
is there any chance that support for array.array might get included in a 
future cython version?

Cheers,
Oscar.

On Thursday, 17 May 2012 06:44:38 UTC+1, Robert Bradshaw wrote:
&lt;/pre&gt;</description>
    <dc:creator>Oscar Benjamin</dc:creator>
    <dc:date>2012-05-17T15:45:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6433">
    <title>Unable to Reference Other Class Variables?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6433</link>
    <description>&lt;pre&gt;I have a module that I previously compiled with Pyrex that I've tried
compiling with Cython and referencing a class variable from another
class no longer works.  I have provided a small example that when
compiled in Pyrex does what I expect (instances of Class1 have a
__connected value that can be queried, and requesting an instance of
Class2 using Class1's createClass2 can query the Class1 instance in
isConnected).  In Cython, directly querying __connected from the
python interactive console throws "AttributeError: Class1 instance has
no attribute '__connected'" which seems wrong.  Trying isConnected
from an instance of Class2 returns "AttributeError: Class1 instance
has no attribute '_Class2__connected'" which is definitely wrong, as
__connected was explicitly requested from the Class1 instance.  The
toy code is below:

class Class1:
    def __init__( self ):
        self.__connected = 0

    def __del__( self ):
        if self.__connected == 1:
            # Disconnect if necessary
            self.disco&lt;/pre&gt;</description>
    <dc:creator>Shaun Taylor</dc:creator>
    <dc:date>2012-05-17T20:32:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6432">
    <title>DLLs in python 3</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6432</link>
    <description>&lt;pre&gt;I appreciate that this is more general than just Cython, but if someone
has the answer it would avoid me having to sign up to another list...

Does Python 3 have a different requirement on where Windows DLLs get
placed in order that they can be accessed?

I ask as a user is having difficulty in using some Cython wrappers I
wrote that invoke a DLL. He's trying to build the wrappers for Python 3,
which I haven't had chance to do yet. The package that is built includes
the DLL and the pyd file and places it in Lib/site-packages/pyfftw
(where it should), which works fine on the binaries I've created.

To get it to work, it's apparently necessary to copy the DLLs and pyd to
DLLs/. Is this expected behaviour?

Cheers,

Henry


&lt;/pre&gt;</description>
    <dc:creator>Henry Gomersall</dc:creator>
    <dc:date>2012-05-18T10:14:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6431">
    <title>Re: Pickling of extension class problems</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6431</link>
    <description>&lt;pre&gt;

Robert,

I tried a lot of different things, and none of them seemed to make a
difference, and then it just magically worked.  I have no idea why, or
which thing that I did that fixed it, but for now it seems all is good.

Thanks for your help,
Ian
&lt;/pre&gt;</description>
    <dc:creator>Ian Bell</dc:creator>
    <dc:date>2012-05-18T01:41:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6430">
    <title>Re: crash with free() under windows</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6430</link>
    <description>&lt;pre&gt;
No, it wasn't this (indeed, the docs make it quite explicit what should
be done).

I've written a minimal test case that triggers the bug:
https://github.com/hgomersall/Blog-Code/tree/master/cython_string_bug

In the hello_string directory is the code to compile a very small dll
with a single function that just mallocs some memory and copies a string
in, and then returns that pointer. The Makefile describes the build
(there is also a Makefile_linux for building a .so).

The Cython .pyx file simply converts the string returned from the dll
into a python object, and then frees the string, returning the object.
test.py then uses that python library.

Under windows, the crash occurs at the free() line. Under linux, there
is no problem at all.

This code is basically *exactly* the same, as far as I can tell, as the
documented string example:
http://docs.cython.org/src/tutorial/strings.html

I haven't had chance to see whether it is the free() call itself (in the
c code) that is causing the crash, or whether it i&lt;/pre&gt;</description>
    <dc:creator>Henry Gomersall</dc:creator>
    <dc:date>2012-05-17T12:15:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6429">
    <title>Re: Pickling of extension class problems</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6429</link>
    <description>&lt;pre&gt;
This is probably due to imports being messed up (due to moving .pyd
files around?) What does your directory structure and setup.py file
look like?


&lt;/pre&gt;</description>
    <dc:creator>Robert Bradshaw</dc:creator>
    <dc:date>2012-05-17T07:40:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6428">
    <title>Re: crash with free() under windows</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6428</link>
    <description>&lt;pre&gt;
I'm guessing that the char* is being allocated by something other than
malloc in the Windows case. Does the library provide a function for
freeing memory that it allocated? (This probably works in Linux
because the library happens to use the same system malloc under the
hood.)

- Robert

&lt;/pre&gt;</description>
    <dc:creator>Robert Bradshaw</dc:creator>
    <dc:date>2012-05-17T05:51:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6427">
    <title>Re: Excellent performance with Cython for subclassed list</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6427</link>
    <description>&lt;pre&gt;
True. We should link to this from the docs.


Yes, that could be.


Please send us a pull request fixing this issue. I don't think any of
us core devs ever use Windows, so I was completely unaware of this
having never tried to run it myself (and having no way to test it).

- Robert

&lt;/pre&gt;</description>
    <dc:creator>Robert Bradshaw</dc:creator>
    <dc:date>2012-05-17T05:44:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6426">
    <title>Re: Excellent performance with Cython for subclassed list</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6426</link>
    <description>&lt;pre&gt;

Ian Bell &amp;lt;ian.h.bell&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


It is actually very difficult to consider Windows users when most (all?) of the contributors use Linux or Mac themselves. Just getting new releases of Cython tested on a windows box can be a challenge...

What needs to happen is for somebody who is familiar with Windows to do the testing and submit the patches.

Dag


&lt;/pre&gt;</description>
    <dc:creator>Dag Sverre Seljebotn</dc:creator>
    <dc:date>2012-05-17T05:25:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6425">
    <title>Re: Excellent performance with Cython for subclassed list</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6425</link>
    <description>&lt;pre&gt;On Wed, May 16, 2012 at 12:48 AM, Oscar Benjamin &amp;lt;oscar.j.benjamin&amp;lt; at &amp;gt;gmail.com


Oscar,

Thanks for re-working the example with the array, performance is pretty
awesome :).  I will go ahead and update the wiki page with the array type
results and the code.

To everyone else, I JUST found the Demos folder in the trunk.  Would be
great to have them in a more obvious place, or documented.  Something like
the listm/arraym example would be a great addition I think.

One more thing.  Could you please consider us poor Windows users when you
write make files, etc?  Building the docs I can't use the stock make file
due to forward-slash / backwards-slash fun.

Regards,
Ian
&lt;/pre&gt;</description>
    <dc:creator>Ian Bell</dc:creator>
    <dc:date>2012-05-17T05:07:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6424">
    <title>Re: Re: ANN: Cython wrapper of Eigen matrix template class</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6424</link>
    <description>&lt;pre&gt;As a slight aside, I've started working on an alternative to 
scipy.sparse which wraps the sparse parts of Eigen 
(https://github.com/charanpald/sparray) and provides a numpy-like 
interface. I wasn't aware of Runar's attempt to do a similar thing, but 
perhaps we can combine efforts if it is still being worked on?

Charanpal

On 16/05/2012 17:23, Bill Noon wrote:

&lt;/pre&gt;</description>
    <dc:creator>Charanpal Dhanjal</dc:creator>
    <dc:date>2012-05-16T15:35:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.cython.user/6423">
    <title>Re: ANN: Cython wrapper of Eigen matrix template class</title>
    <link>http://permalink.gmane.org/gmane.comp.python.cython.user/6423</link>
    <description>&lt;pre&gt;Is this code still available?  The googlecode repository seems to have 
disappeared.

Thanks --Bill


On Monday, February 8, 2010 8:49:56 AM UTC-5, rute wrote:
&amp;gt;&lt;/pre&gt;</description>
    <dc:creator>Bill Noon</dc:creator>
    <dc:date>2012-05-16T15:23:16</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.cython.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.cython.user</link>
  </textinput>
</rdf:RDF>

