Skip to content

Commit

Permalink
MNT update import for keras
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Oct 21, 2021
1 parent 58f4a11 commit 3228f8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/miscellaneous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ calling ``fit_generator`` method to train the model. To illustrate, we will
define a logistic regression model::

>>> import keras
>>> y = keras.utils.to_categorical(y, 3)
>>> y = keras.utils.np_utils.to_categorical(y, 3)
>>> model = keras.Sequential()
>>> model.add(keras.layers.Dense(y.shape[1], input_dim=X.shape[1],
... activation='softmax'))
Expand Down
2 changes: 1 addition & 1 deletion imblearn/keras/tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
keras = pytest.importorskip("keras")
from keras.models import Sequential # noqa: E402
from keras.layers import Dense # noqa: E402
from keras.utils import to_categorical # noqa: E402
from keras.utils.np_utils import to_categorical # noqa: E402

from imblearn.datasets import make_imbalance # noqa: E402
from imblearn.under_sampling import ClusterCentroids # noqa: E402
Expand Down

0 comments on commit 3228f8a

Please sign in to comment.