INNER CODE UNIT · Python

_channel_kwarg

scikit-image/scikit-image · benchmarks/__init__.py:8

def _channel_kwarg(is_multichannel=False):
    if np.lib.NumpyVersion(skimage.__version__) < '0.19.0':
        return dict(multichannel=is_multichannel)
    else:
        return dict(channel_axis=-1 if is_multichannel else None)


def _skip_slow():
    """
    Use this function to skip slow or highly demanding tests.

    Use it as a `Class.setup` method or a `function.setup` attribute.

    For example:

    >>> from . import _skip_slow
    >>> def time_something_slow():
    ...     pass

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…