Skip to content

Commit

Permalink
change scipy import
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedongPeng committed Sep 21, 2023
1 parent 72b142b commit ff401df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyomo/contrib/mindtpy/tests/MINLP_simple_grey_box.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pyomo.common.dependencies import numpy as np
from pyomo.common.dependencies.scipy.sparse import coo_matrix
import pyomo.common.dependencies.scipy.sparse as scipy_sparse
from pyomo.contrib.pynumero.interfaces.external_grey_box import ExternalGreyBoxModel
from pyomo.contrib.pynumero.interfaces.external_grey_box import ExternalGreyBoxBlock

Expand Down Expand Up @@ -135,4 +135,4 @@ def evaluate_jacobian_outputs(self):
row[0], col[4], data[4] = (0, 4, 0.5) # y3

# sparse matrix
return coo_matrix((data, (row, col)), shape=(1, 5))
return scipy_sparse.coo_matrix((data, (row, col)), shape=(1, 5))
4 changes: 2 additions & 2 deletions pyomo/contrib/pynumero/interfaces/external_grey_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

import abc
import logging
from pyomo.common.dependencies import numpy as np
from pyomo.common.dependencies.scipy.sparse import coo_matrix
import numpy as np
from scipy.sparse import coo_matrix

from pyomo.common.deprecation import RenamedClass
from pyomo.common.log import is_debug_set
Expand Down

0 comments on commit ff401df

Please sign in to comment.