Expected behavior.
I am trying to run my code in which I faced the issue saying
cannot import name 'NumpyProxyArray' from 'CADETProcess.dataStructure' (C:\Users\modia\anaconda3\envs\cadet-env\lib\site-packages\CADETProcess\dataStructure\__init__.py)
For which I followed the traceback and also saw on docs whether NumpyProxyArray
exists or not..
Actual behavior
So this was the Traceback which I followed:
Traceback (most recent call last):
File ~\anaconda3\envs\cadet-env\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\modia\onedrive - iit delhi\desktop\pharma project\cadet-process python\forwardsim1\untitled0.py:15
from CADETProcess.simulator import Simulator
File ~\anaconda3\envs\cadet-env\lib\site-packages\CADETProcess\__init__.py:38
from . import optimization
File ~\anaconda3\envs\cadet-env\lib\site-packages\CADETProcess\optimization\__init__.py:101
from .optimizationProblem import *
File ~\anaconda3\envs\cadet-env\lib\site-packages\CADETProcess\optimization\optimizationProblem.py:22
from CADETProcess.dataStructure import (
ImportError: cannot import name 'NumpyProxyArray' from 'CADETProcess.dataStructure' (C:\Users\modia\anaconda3\envs\cadet-env\lib\site-packages\CADETProcess\dataStructure\__init__.py)
Here in OptimizationProblem.py
I noticed that its asking to call NumpyProxyArray from dataStructure directly, but here I say the problem in _init_.py
in DataStructures and it was not present there. It was instead present in submodule aggregator, which did have NumpyProxyError
. This error happened after I updated to v0.11 of CADET-Process. I also saw on the docs that indeed its now placed in submodule.
So what can be possible solutions and what should I do, Some suggestions I got were as follows:
- downgrade to v0.10
- do modification in installed package
So I wanted some idea regarding what should be done
Thank you,
Abhinav
How to produce bug (including a minimal reproducible example)
test_import_bug.py
from CADETProcess.dataStructure import NumpyProxyArray # This will cause ImportError