arigato changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | mac OS and Fedora are not Windows
lritter has quit [Quit: Leaving]
tim has joined #pypy
tim has quit [Client Quit]
jcea has quit [Quit: jcea]
ceridwen has quit [Ping timeout: 246 seconds]
ceridwen has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
Ai9zO5AP has joined #pypy
moei has joined #pypy
PileOfDirt has quit [Quit: Leaving]
dddddd has quit [Remote host closed the connection]
_whitelogger has joined #pypy
xcm has quit [Read error: Connection reset by peer]
xcm has joined #pypy
_whitelogger_ has joined #pypy
_whitelogger has quit [Remote host closed the connection]
_whitelogger has joined #pypy
ceridwen has quit [Ping timeout: 246 seconds]
_whitelogger has joined #pypy
Ai9zO5AP has quit [Read error: Connection reset by peer]
Ai9zO5AP has joined #pypy
Ai9zO5AP has quit [Read error: Connection reset by peer]
Ai9zO5AP has joined #pypy
Zaab1t has joined #pypy
_whitelogger has joined #pypy
bendlas has quit [Remote host closed the connection]
commandoline has quit [Ping timeout: 246 seconds]
commandoline has joined #pypy
bendlas has joined #pypy
dddddd has joined #pypy
<arigato> snow, snow!
demonimin has joined #pypy
Ai9zO5AP has quit [Ping timeout: 258 seconds]
Ai9zO5AP has joined #pypy
Ai9zO5AP has quit [Read error: Connection reset by peer]
Ai9zO5AP has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
lritter has joined #pypy
Ai9zO5AP has quit [Ping timeout: 258 seconds]
Ai9zO5AP has joined #pypy
<LarstiQ> https://lwn.net/Articles/775916/ is now open to non-subscribers
xcm is now known as Guest7918
Guest7918 has quit [Killed (tepper.freenode.net (Nickname regained by services))]
xcm has joined #pypy
jcea has joined #pypy
Zaab1t has quit [Quit: bye bye friends]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
scorpion81 has joined #pypy
<scorpion81> hello, is there a way to actually get structured python lists like [[1,2], [3,4]][[5,6],[7,8]] from cffi in a fast call ? like if you have some nested array cdata, how can you quickly convert it to its structured counterpart in python ? if i manually loop over each dimension, this becomes slower than the calculation in C and in the end slower than a "full" py implementation of the same calculation, lol.
<scorpion81> would be very handy to have something like array.tolist() like numpy does... (but converting cdata into ndarray via buffers or so "flattens" the array structure)
<mattip> what does your struct in C look like? How do you know the shape of the underlying flat buffer in C?
ceridwen has joined #pypy
ceridwen has quit [Changing host]
ceridwen has joined #pypy
<scorpion81> well it is a 3 dimensional array with 2 variable lengths, and the 3rd lengths is 3
<scorpion81> like float *(*verts)[3]
<scorpion81> i "know" the structure because i i know how many verts per item and how many items i expect
<scorpion81> like items * verts_per_item * 3
<mattip> so get it into a numpy array and reshape it
<mattip> assuming the memory is contiguous
<scorpion81> ah, can numpy reshape "flat" arrays again ? (i am kind of newbie in numpy, thats why i ask :) )
<mattip> yes, in place `a=np.ones(24); a.shape = (2, 3, 4)`
<scorpion81> hmmm aaaah ok, let me try
<mattip> or where b is a view to a's data `a=np.ones(24); b = a.reshape(2, 3, 4)`
PileOfDirt has joined #pypy
<scorpion81> cool, it works fine :) thanks :)
irclogs_io_bot has quit [Remote host closed the connection]
<mattip> scorpion81: maybe add a note to the stack overflow question
<scorpion81> mattip: do you want to or should I ? :)
irclogs_io_bot has joined #pypy
<mattip> scorpion81: please do, you can give an example
<scorpion81> mattip: ok
lritter has quit [Ping timeout: 252 seconds]
scorpion81 has left #pypy [#pypy]
Garen_ has joined #pypy
Garen has quit [Ping timeout: 268 seconds]
Garen_ has quit [Read error: Connection reset by peer]
Garen has joined #pypy