Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If you use Symbol('h', real=True) as a parameter in your model you get an error #162

Closed
moorepants opened this issue May 24, 2024 · 0 comments
Milestone

Comments

@moorepants
Copy link
Member

ImportError: Unable to import the compiled Cython module ufuncify_matrix_1, compilation likely failed. STDERR output from compilation:
/home/moorepants/miniconda/envs/opty-dev/lib/python3.12/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/tmp0scriqjd.opty_ufuncify_compile/ufuncify_matrix_1.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...
                     double m,
                     double l,
                     double w,
                     double h,
                     double g,
                     double h):
                     ^
------------------------------------------------------------

ufuncify_matrix_1.pyx:85:21: 'h' redeclared 

Error compiling Cython file:
------------------------------------------------------------
...
                     np.ndarray[np.double_t, ndim=1] F3i,
                     np.ndarray[np.double_t, ndim=1] F4i,
                     double m,
                     double l,
                     double w,
                     double h,
                     ^
------------------------------------------------------------

ufuncify_matrix_1.pyx:83:21: Previous declaration is here
Traceback (most recent call last):
  File "/tmp/tmp0scriqjd.opty_ufuncify_compile/ufuncify_matrix_1_setup.py", line 14, in <module>
    ext_modules=cythonize([extension]))
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/moorepants/miniconda/envs/opty-dev/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
    cythonize_one(*args)
  File "/home/moorepants/miniconda/envs/opty-dev/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: ufuncify_matrix_1.pyx
@moorepants moorepants added this to the Version 1.3.0 milestone Jul 15, 2024
moorepants added a commit that referenced this issue Jul 15, 2024
Use a more unique symbol for h internally, fixes #162.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant