-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch from local _shared/lazy.py to lazy_loader package
use .pyi type stubs
- Loading branch information
Showing
12 changed files
with
152 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ virtualenv>=16.6.0 | |
pip>=19.1.1 | ||
setuptools>=18.0.1 | ||
six>=1.14.0 | ||
lazy_loader>=0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# | ||
# Copyright (c) 2020-2021, NVIDIA CORPORATION. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
submodules = [] | ||
|
||
try: | ||
import cupy | ||
_is_cupy_available = True | ||
submodules += ['core', 'skimage'] | ||
except ImportError: | ||
pass | ||
|
||
try: | ||
from .clara import CuImage, __version__, cli | ||
_is_clara_available = True | ||
submodules += ['clara'] | ||
except ImportError: | ||
from ._version import get_versions | ||
__version__ = get_versions()['version'] | ||
del get_versions | ||
del _version | ||
|
||
__all__ = submodules + ['__version__', 'is_available'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import lazy_loader as lazy | ||
|
||
submodules = [ | ||
'color', | ||
'data', | ||
'exposure', | ||
'feature', | ||
'filters', | ||
'measure', | ||
'metrics', | ||
'morphology', | ||
'registration', | ||
'restoration', | ||
'segmentation', | ||
'transform', | ||
'util', | ||
] | ||
|
||
__all__ = submodules | ||
|
||
from . import (color, data, exposure, feature, filters, measure, metrics, | ||
morphology, registration, restoration, segmentation, transform, | ||
util) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
from .._shared import lazy | ||
import lazy_loader as lazy | ||
|
||
__getattr__, __dir__, __all__ = lazy.attach( | ||
__name__, | ||
submodules={}, | ||
submod_attrs={ | ||
'_binary_blobs': ['binary_blobs'], | ||
} | ||
) | ||
__getattr__, __dir__, __all__ = lazy.attach_stub(__name__, __file__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
__all__ = [ | ||
'binary_blobs', | ||
] | ||
|
||
from ._binary_blobs import binary_blobs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,3 @@ | ||
from .._shared import lazy | ||
import lazy_loader as lazy | ||
|
||
__getattr__, __dir__, __all__ = lazy.attach( | ||
__name__, | ||
# submodules={'rank'}, | ||
submod_attrs={ | ||
'lpi_filter': ['filter_inverse', 'wiener', 'LPIFilter2D'], | ||
'_gaussian': ['gaussian', 'difference_of_gaussians'], | ||
'edges': ['sobel', 'sobel_h', 'sobel_v', | ||
'scharr', 'scharr_h', 'scharr_v', | ||
'prewitt', 'prewitt_h', 'prewitt_v', | ||
'roberts', 'roberts_pos_diag', 'roberts_neg_diag', | ||
'laplace', | ||
'farid', 'farid_h', 'farid_v'], | ||
'_rank_order': ['rank_order'], | ||
'_gabor': ['gabor_kernel', 'gabor'], | ||
'thresholding': ['threshold_local', 'threshold_otsu', 'threshold_yen', | ||
'threshold_isodata', 'threshold_li', 'threshold_minimum', | ||
'threshold_mean', 'threshold_triangle', | ||
'threshold_niblack', 'threshold_sauvola', | ||
'threshold_multiotsu', 'try_all_threshold', | ||
'apply_hysteresis_threshold'], | ||
'ridges': ['meijering', 'sato', 'frangi', 'hessian'], | ||
'_median': ['median'], | ||
'_sparse': ['correlate_sparse'], | ||
'_unsharp_mask': ['unsharp_mask'], | ||
'_window': ['window'], | ||
'_fft_based': ['butterworth'] | ||
} | ||
) | ||
__getattr__, __dir__, __all__ = lazy.attach_stub(__name__, __file__) |
Oops, something went wrong.