Skip to content

Commit 8e0fd73

Browse files
committed
[DOC] Code formatting
1 parent 8870f38 commit 8e0fd73

File tree

9 files changed

+18
-22
lines changed

9 files changed

+18
-22
lines changed

deepforest/_cutils.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# cython: nonecheck=False
55
# cython: language_level=3
66

7-
# Author: Yi-Xuan Xu
8-
97

108
cimport cython
119
import numpy as np

deepforest/_estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""A wrapper on the base estimator for naming consistency."""
1+
"""A wrapper on the base estimator for the naming consistency."""
22

33

44
__all__ = ["Estimator"]

deepforest/_forest.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# cython: nonecheck=False
55
# cython: language_level=3
66

7-
# Author: Yi-Xuan Xu
8-
97

108
cimport cython
119
import numpy as np

deepforest/cascade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _build_predictor(
148148
verbose : :obj:`int`, default=1
149149
Controls the verbosity when fitting and predicting.
150150
151-
- If ``<= 0``, slient mode, which means no logging information will
151+
- If ``<= 0``, silent mode, which means no logging information will
152152
be displayed;
153153
- If ``1``, logging information on the cascade layer level will be
154154
displayed;

deepforest/forest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/ensemble/_forest.py
66
"""
77

8+
9+
__all__ = ["RandomForestClassifier",
10+
"ExtraTreesClassifier"]
11+
812
import numbers
913
from warnings import warn
1014
import threading
@@ -34,10 +38,6 @@
3438
from .tree._tree import DOUBLE
3539

3640

37-
__all__ = ["RandomForestClassifier",
38-
"ExtraTreesClassifier"]
39-
40-
4141
MAX_INT = np.iinfo(np.int32).max
4242

4343

deepforest/tree/_tree.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
# cython: boundscheck=False
33
# cython: wraparound=False
44

5+
# This class is modified from:
6+
# https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tree/_tree.pyx
7+
58

69
from cpython cimport Py_INCREF, PyObject, PyTypeObject
710

811
from libc.stdlib cimport free
912
from libc.string cimport memcpy
10-
# This class is modified from:
11-
# https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tree/_tree.pyx
1213

1314

1415
from libc.string cimport memset

deepforest/tree/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
32
import numpy
43
from numpy.distutils.misc_util import Configuration
54

deepforest/tree/tree.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"""
77

88

9+
__all__ = ["DecisionTreeClassifier",
10+
"ExtraTreeClassifier"]
11+
912
import numbers
1013
import warnings
1114
from abc import ABCMeta
@@ -32,9 +35,6 @@
3235
from ._tree import Tree
3336
from . import _tree, _splitter, _criterion
3437

35-
__all__ = ["DecisionTreeClassifier",
36-
"ExtraTreeClassifier"]
37-
3838

3939
# =============================================================================
4040
# Types and constants

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import os
22
import sys
3-
3+
import numpy
44
import setuptools
55
from setuptools import find_packages
6-
7-
import numpy
86
from numpy.distutils.core import setup
97

108

11-
# Package Info
9+
# Project Information
1210
DISTNAME = "deep-forest"
1311
DESCRIPTION = "Deep Forest"
1412
with open("README.rst") as f:
@@ -20,10 +18,12 @@
2018

2119

2220
def configuration(parent_package="", top_path=None):
21+
2322
if os.path.exists("MANIFEST"):
2423
os.remove("MANIFEST")
2524

2625
from numpy.distutils.misc_util import Configuration
26+
2727
config = Configuration(None, parent_package, top_path)
2828
config.add_subpackage("deepforest")
2929

@@ -37,7 +37,7 @@ def configuration(parent_package="", top_path=None):
3737

3838
os.chdir(local_path)
3939
sys.path.insert(0, local_path)
40-
40+
4141
setup(configuration=configuration,
4242
name=DISTNAME,
4343
maintainer=MAINTAINER,
@@ -65,7 +65,7 @@ def configuration(parent_package="", top_path=None):
6565
],
6666
python_requires=">=3.6",
6767
install_requires=[
68-
"numpy>=1.13.3",
68+
"nnumpy>=1.13.3,<1.20.0",
6969
"scipy>=0.19.1",
7070
"joblib>=0.11",
7171
"scikit-learn>=0.22",

0 commit comments

Comments
 (0)