Thanks Aaron for the reply
I tried to install by running 'python setup.py install' outside the
MassMatrix folder. I also set path variable in setup.py for the various
modules (like wrapper_module_0.pyx etc) as follows
af = '/home/ash/Ash/model_predictive_control/src/Lm/'
ext_mods = [Extension(
af+'wrapper_module_3', [af+'wrapper_module_3.pyx',
af+'wrapped_code_3.c'],
include_dirs=[np.get_include()],
library_dirs=[],
libraries=[],
extra_compile_args=['-std=c99'],
extra_link_args=[]
Still the import (from MassMatrix.wrapper_module_0 import autofunc_c as MM)
does not work
Ash
On Monday, 25 November 2019 18:13:55 UTC, Aaron Meurer wrote:
>
> If MassMatrix is your module, then generally setup.py should sit alongside
> the module, not inside of it.
>
> Aaron Meurer
>
> On Mon, Nov 25, 2019 at 11:11 AM Ash <[email protected] <javascript:>>
> wrote:
>
>> Thanks for the reply. I did have __init__.py in my MassMatrix folder but
>> still the error persists. Attaching a screenshot of the folder
>>
>>
>> [image: massmatrix.png]
>>
>>
>> Ash
>>
>> On Monday, 25 November 2019 17:53:22 UTC, Aaron Meurer wrote:
>>>
>>> On Mon, Nov 25, 2019 at 10:47 AM Ash <[email protected]> wrote:
>>> >
>>> > Hello,
>>> > I have gone through the code generation tutorial (
>>> https://github.com/shyamashi/scipy-2017-codegen-tutorial/blob/master/notebooks/08-cythonizing.ipynb)
>>>
>>> and converted my matrices (mass & coriolis) into a 'C' code and created two
>>> folders MassMatrix and Coriolisvector. The following two lines are the one
>>> which I used
>>> >
>>> >
>>> > from sympy.utilities.autowrap import autowrap
>>> > auto_odes = autowrap(mass_matrix, backend='cython',
>>> tempdir='./MassMatrix')
>>> >
>>> > Inside MassMatrix folder, I see file names starting with 'wrapper.',
>>> setup.py etc.. Is there a way to rename this file (wrapper) when it's being
>>> created? Also, I
>>> > ran the command 'python setup.py install' and tried to do
>>> >
>>> > from MassMatrix.wrapper_module_0 import autofunc_c as MM
>>> >
>>> > It throws an error 'No module named 'MassMatrix.wrapper_module_0'. Can
>>> anyone tell me what am I doing wrong? Is there a more elegant way to do
>>> this?
>>> > My folder structure is
>>> >
>>> > ABC
>>> > MassMatrix
>>> > Coriolis
>>> >
>>> > All the above are names of folders and I am inside ABC folder
>>>
>>> What are the files inside the MassMatrix folder? Make sure you have an
>>> __init__.py file there.
>>>
>>> Aaron Meurer
>>>
>>> >
>>> > Thanks in advance for any help
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "sympy" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/sympy/21abfcb4-46cc-462b-9abd-75c0d21fd641%40googlegroups.com.
>>>
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sympy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sympy/07d204d4-290d-4cee-a39a-f9dba038530c%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/sympy/07d204d4-290d-4cee-a39a-f9dba038530c%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/b843f53e-8891-46b0-b665-362e432d890f%40googlegroups.com.