Skip to content

Current git master does not import cleanly if bottleneck is not installed #755

Closed
@lbeltrame

Description

@lbeltrame

The culprit is in nanops.py, line 17 (some extra lines shown for context):

try:
    import bottleneck as bn
    _USE_BOTTLENECK = True
except ImportError:  # pragma: no cover
    _USE_BOTTLENECK = False

def _bottleneck_switch(bn_name, alt, **kwargs):
    try:
        bn_func = getattr(bn, bn_name)

bn is only defined if bottleneck is imported and the try statement doesn't catch the NameError that ensues (only AttributeError).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions