You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new in working python.
I'm working with this code, but unfortunately, I see this error
"
ModuleNotFoundError Traceback (most recent call last)
in ()
10 from six import iteritems
11
---> 12 from cobra.core.model import Model
13
14
ModuleNotFoundError: No module named 'cobra.core.model'
"
Does anyone experience this error?
-- coding: utf-8 --
from future import absolute_import
from sys import maxsize
from warnings import warn
from numpy import array, ndarray
from scipy.sparse import dok_matrix, lil_matrix
from six import iteritems
from cobra.core.model import Model
class ArrayBasedModel(Model):
"""ArrayBasedModel is a class that adds arrays and vectors to
a cobra.Model to make it easier to perform linear algebra operations.
"""
def __init__(self, description=None, deepcopy_model=False,
matrix_type='scipy.lil_matrix'):
"""
description: None | String | cobra.Model
deepcopy_model: Boolean. If True and description is
a cobra.Model then make a deepcopy of the Model before
creating the ArrayBasedModel.
matrix_type: 'scipy.lil_matrix' or 'scipy.dok_matrix'
Specifies which type of backend matrix to use for S.
"""
warn("ArrayBasedModel is deprecated, use "
"`cobra.util.array.create_stoichiometric_matrix` instead",
DeprecationWarning)
if deepcopy_model and isinstance(description, Model):
description = description.copy()
Model.__init__(self, description)
self._S = None
self.matrix_type = matrix_type
self.update()
# no setter for S at the moment
@property
def S(self):
"""Stoichiometric matrix of the model
This will be formatted as either :class:`~scipy.sparse.lil_matrix`
or :class:`~scipy.sparse.dok_matrix`
"""
return self._S
The text was updated successfully, but these errors were encountered:
I am new in working python.
I'm working with this code, but unfortunately, I see this error
"
ModuleNotFoundError Traceback (most recent call last)
in ()
10 from six import iteritems
11
---> 12 from cobra.core.model import Model
13
14
ModuleNotFoundError: No module named 'cobra.core.model'
"
Does anyone experience this error?
-- coding: utf-8 --
from future import absolute_import
from sys import maxsize
from warnings import warn
from numpy import array, ndarray
from scipy.sparse import dok_matrix, lil_matrix
from six import iteritems
from cobra.core.model import Model
class ArrayBasedModel(Model):
"""ArrayBasedModel is a class that adds arrays and vectors to
a cobra.Model to make it easier to perform linear algebra operations.
The text was updated successfully, but these errors were encountered: