Thanks to visit codestin.com
Credit goes to github.com

Skip to content

WIP, MAINT: Improve import time #14083

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
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
lazy import weakref
  • Loading branch information
hmaarrfk committed Jul 23, 2019
commit 0ae6ba7a51c57e77313fc7ca842f8abe584fbd1c
2 changes: 1 addition & 1 deletion numpy/lib/npyio.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import functools
import itertools
import warnings
import weakref
import contextlib
from operator import itemgetter, index as opindex

Expand Down Expand Up @@ -87,6 +86,7 @@ class BagObj(object):
"""

def __init__(self, obj):
import weakref
# Use weakref to make NpzFile objects collectable by refcount
self._obj = weakref.proxy(obj)

Expand Down