How to build a Cython package with python, numpy and c language

preview_player
Показать описание
dummypackage repository :

Рекомендации по теме
Комментарии
Автор

That's really great. It was very comprehensive, even tough it's in English.

I would love to see some more Cython videos, maybe something more introductory would be cool.

IDViotti
Автор

Exactly what I was looking for. Thanks!

matematicaHobby
Автор

Quite an interesting video, thanks for the quick walkthrough.
I am trying to cross compile the regex and the numpy packages on an Ubuntu machine in order to let them run on a special Linux distribution for a <32bit microcontroller.
I am not experienced with C code so I am wondering if I can use your instructions here to achieve my goal, or should more C stuff happen before I can cross compile my code?
Cheers

shalandichannel
Автор

I tried cython few weeks ago but it seemed slower than ctypes. My project was a gui library created in cython with windows api funcs. It turned out that regular python + ctypes is running 2x speed than cython. Then I tried to write all the stuff in C and created a dll. Then called this dll from cython. That worked, cython ran faster than ctypes with same dll. But then I faced a BIG problem. We can't easily get a python function's pointer and call it in C world. We can of course, call cython functions in C. We can also wrap python function inside cython func. But we cannot use pointer type parameters in python code. We need to convert them to object before use. All these type conversion makes cython slow. I think cython is good when we have a long running function. It is not good for guis where rapid callbacks are needed.

kcvinu
Автор

Ola Rafael, tudo bem? Eu cheguei ate aqui atraves do curso da Udemy Python para Engenheiros e Cientistas. Nao consegui tirar esta duvida ainda e nao consigo avancar no curso em funcao disso. Se me permitir: Em 6.1.3 vc fala sobre pip.exe. No pacote que eu baixei, nao veio este arquivo. Como devo proceder? pip install pyNastran tem que ser digitado onde?
Agradeço imenso se puder por favor responder.

andressaavelar
join shbcf.ru