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

TypeError: 'numpy.ndarray' object is not callable #48

Open
ilikebomb opened this issue Dec 6, 2024 · 0 comments
Open

TypeError: 'numpy.ndarray' object is not callable #48

ilikebomb opened this issue Dec 6, 2024 · 0 comments

Comments

@ilikebomb
Copy link

Hi, there!
I am using interpreter.py from https://deng-mit.github.io/Arrhenius.jl/dev/get_started/ to generate a .npz input for Arrhenius.jl.
But i encountered with following error in reactorch:

C:\Users\ChaoLW.conda\envs\ct-env\Lib\site-packages\reactorch-0.1.1-py3.12.egg\reactorch\solution.py:76: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at C:\cb\pytorch_1000000000000\work\torch\csrc\utils\tensor_new.cpp:281.)
self.molecular_weights = torch.Tensor([self.gas.molecular_weights]).T.to(self.device)
Traceback (most recent call last):
File "D:\AECCCAE\Projects24\h2flame_dns\cema\CEMA-main\interpreter.py", line 39, in
sol = rt.Solution(mech_yaml=mech_yaml, device=torch.device('cpu'),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ChaoLW.conda\envs\ct-env\Lib\site-packages\reactorch-0.1.1-py3.12.egg\reactorch\solution.py", line 88, in init
self.set_reactions()
File "C:\Users\ChaoLW.conda\envs\ct-env\Lib\site-packages\reactorch-0.1.1-py3.12.egg\reactorch\import_kinetics.py", line 38, in set_reactions
self.reactant_stoich_coeffs = torch.Tensor[self.gas.reactant_stoich_coeffs()].to(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'numpy.ndarray' object is not callable

I would like to know any advice for solving this problem, thanks in advance.
Enviroment: Cantera 3.0.1, pytorch 2.5.1

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