Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lbeltrame opened this issue Feb 6, 2012 · 1 comment
Closed

Comments

@lbeltrame
Copy link
Contributor

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).

@wesm wesm closed this as completed in 5602b98 Feb 6, 2012
@wesm
Copy link
Member

wesm commented Feb 6, 2012

Related to a change I made minutes ago. Catching both AttributeError and NameError now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants