I am trying to load a matlab model into cobrapy in a fresh enviroment and I am getting a numpy exception.
cobra.io.load_matlab_model(Path('/scratch/cjrodriguezf/jobs/cancer/signaling_data', 'Human-GEM-1.14.0.mat'))
Traceback (most recent call last):
File "", line 1, in
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/cobra/io/mat.py", line 341, in load_matlab_model
return from_mat_struct(data[possible_name], model_id=possible_name, inf=inf)
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/cobra/io/mat.py", line 872, in from_mat_struct
if np.sctype2char(m["subSystems"][0, 0][0][0]) == "O" and isinstance(
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/numpy/init.py", line 397, in getattr
raise AttributeError(
AttributeError: np.sctype2char was removed in the NumPy 2.0 release. Use np.dtype(obj).char instead.
Traceback (most recent call last):
File "", line 1, in
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/cobra/io/mat.py", line 341, in load_matlab_model
return from_mat_struct(data[possible_name], model_id=possible_name, inf=inf)
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/cobra/io/mat.py", line 872, in from_mat_struct
if np.sctype2char(m["subSystems"][0, 0][0][0]) == "O" and isinstance(
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/numpy/init.py", line 397, in getattr
raise AttributeError(
AttributeError: np.sctype2char was removed in the NumPy 2.0 release. Use np.dtype(obj).char instead.
Is there an existing issue for this?
Problem description
I am trying to load a matlab model into cobrapy in a fresh enviroment and I am getting a numpy exception.
cobra.io.load_matlab_model(Path('/scratch/cjrodriguezf/jobs/cancer/signaling_data', 'Human-GEM-1.14.0.mat')) Traceback (most recent call last): File "", line 1, in
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/cobra/io/mat.py", line 341, in load_matlab_model
return from_mat_struct(data[possible_name], model_id=possible_name, inf=inf)
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/cobra/io/mat.py", line 872, in from_mat_struct
if np.sctype2char(m["subSystems"][0, 0][0][0]) == "O" and isinstance(
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/numpy/init.py", line 397, in getattr
raise AttributeError(
AttributeError:
np.sctype2char
was removed in the NumPy 2.0 release. Usenp.dtype(obj).char
instead.Code sample
Code run:
Traceback:
Traceback (most recent call last): File "", line 1, in
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/cobra/io/mat.py", line 341, in load_matlab_model
return from_mat_struct(data[possible_name], model_id=possible_name, inf=inf)
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/cobra/io/mat.py", line 872, in from_mat_struct
if np.sctype2char(m["subSystems"][0, 0][0][0]) == "O" and isinstance(
File "/scratch/cjrodriguezf/enviroments/cancer/lib/python3.9/site-packages/numpy/init.py", line 397, in getattr
raise AttributeError(
AttributeError:
np.sctype2char
was removed in the NumPy 2.0 release. Usenp.dtype(obj).char
instead.Environment
Anything else?
No response