Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [cython]

Cython is a superset of the Python language for quickly generating Python C extensions.

cython
0 votes
0 answers
15 views

Unable to Compile Modified _criterion.pyx in scikit-learn with Cython

I made some small changes to _criterion.pyx in the scikit-learn project and I'm struggling to recompile it. Here's a summary of the problem and the steps I have taken so far: Failed Approaches: 1. ...
Gojih's user avatar
  • 11
1 vote
0 answers
33 views

Compiler thinks numpy int_t is an invalid type

I found that when I tried to install the PyPI package bposd or ldpc I received the following error (on a mac): Error compiling Cython file: ---------------------------------------------------------...
vand's user avatar
  • 45
1 vote
1 answer
39 views

A created python thread stucks when code is compiled to cython

I have been trying to figure out why the created thread doesn't work and get stuck when compiled into Cython, as it works normally with CPython... main.py from count import count_launcher if __name__ ...
Muhammad Hawash's user avatar
3 votes
1 answer
77 views
+50

Inaccurate Eigenvectors from LAPACK's ZHEEVR routine

I was trying to replace Scipy's eigh routine in my cython code with C-level LAPACK. Essentially I want to compute eigenvectors corresponding to the largest and smallest eigenvalues of a hermitian ...
mgns's user avatar
  • 91
0 votes
1 answer
52 views

Cython - How do we implement Tuple of Object in Cython?

I want to implement tuple of object in my cython project. I couldn't find a way to implement in .pyx file so that I can use it in python. You can check my get_language method for some reference. And ...
Punreach Rany's user avatar
-2 votes
1 answer
34 views

PyCharm cython hinting won't work with libcpp

I can't get PyCharm to hint methods for libcpp library for example for vector container. This is my code: from libcpp.vector cimport vector cdef vector[int] v v.push_back(1) PyCharm can't see ...
emot's user avatar
  • 109
-1 votes
0 answers
20 views

cython (cglan) hangs on m3 macOS Sonoma x86_64

I have a python program that I've been working with for years and building on a macOS Catalina (x86) machine. The python code is Cythonized for speed and some code security (obfuscation). This has ...
geoffr98's user avatar
1 vote
0 answers
48 views

Cython - Export my lib to a .so file and use in a C program - Symbols not found

I'm learning cython and the exercise I'm doing wants me to make a lib (.so) to use in a C program (already compiled), that require that lib. I already have done the lib. It is working. But now, I need ...
jessica arruda's user avatar
0 votes
0 answers
32 views

how to read cython shared object file? [closed]

I just came to know about shared object of cython and I tried to read it but unable to read but I am curious in knowing how to read code inside cython shared object file are they readable ?
zircon's user avatar
  • 898
2 votes
0 answers
63 views

cimport cython module that wraps C libraries

I have this kind of C/cython project: project/ ├── src/ │ └── modules/ │ ├── cython1.pyx │ ├── cython1.pxd │ ├── cython2.pyx │ ├── cython2.pxd │ ├── includes/ │ │ ...
Ipse Lium's user avatar
  • 1,050
0 votes
0 answers
25 views

Cython function accepting memoryview breaks at runtime

I have a small cython wrapper around some C++ code, which should accept numpy arrays as inputs to the python interface, and loop over them quickly as memoryviews internally. However I get this error ...
Ouroboros's user avatar
-1 votes
0 answers
31 views

Debugging Cythonized code using Visual Studio 2022

I am trying to debug a Cythonized Python project using Visual Studio 2022 with the following setup.py file: extensions = [ Extension("ticker", ["ticker.py"], ...
ronnys's user avatar
  • 1
0 votes
0 answers
47 views

Python Embeddable Cython cythonize tools Error On Windows 10

I want to use a Embeddable version of Python, but I encountered an issue while using Cython tools. I don't want to switch to the installation version. cythonize utils.py Traceback (most recent call ...
Jo Omer's user avatar
  • 13
1 vote
0 answers
41 views

Cython function to return array of mpz_t objects

I am trying to write a Cython function which returns an array of mpz_t (number type of integers from the gmpy2 library). I can successfully define a fixed-size array: cpdef void pows(mpz number): ...
John's user avatar
  • 491
6 votes
2 answers
195 views

Parallelizing numpy.sort

I need to sort uint64 arrays of length 1e8-1e9, which is one of the performance bottlenecks in my current project. I have just recently updated numpy v2.0 version, in which the sorting algorithm is ...
game_difficulty's user avatar

15 30 50 per page
1
2 3 4 5
357