-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
ensure that numpy is not imported on startup #11714
Comments
This comment has been minimized.
This comment has been minimized.
comment:1
Attachment: trac_11714.patch.gz |
Changed keywords from none to sd32 |
Attachment: trac_11714_numpy_startup.patch.gz use lazy imports to make sure numpy is not loaded on startup |
comment:3
With the last patch numpy is not loaded in ./sage and ./sage --startuptime. Surprisingly this doctest fails, i.e., numpy is loaded in the doctests.
I'll post something about the startup improvement once the full doctest run finished. |
comment:4
This passes "make ptestlong" for me, except for the issue with 'numpy' in sys.modules. I thought I posted how to fix this last night, but maybe there was a network problem. One solution is to use the Sage pexpect subprocess. I'm refreshing your patch with that. |
fixes the import numpy issue. make ptestlong passes. |
comment:5
Attachment: trac_11714-only-this.patch.gz |
Reviewer: William Stein |
comment:7
Please correct the authors / reviewers entries in case I missed or confused something. |
This comment has been minimized.
This comment has been minimized.
Author: William Stein, Julian Rueth |
Merged: sage-4.7.2.alpha3 |
This might or might not be worth it. Numpy is actually pretty fast these days (<.05 seconds), and the work needed to not import it is pretty scary. The attached patch causes all kinds of subtle trouble.
Apply only attachment: trac_11714-only-this.patch to the Sage library.
Component: misc
Keywords: sd32
Author: William Stein, Julian Rueth
Reviewer: William Stein
Merged: sage-4.7.2.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/11714
The text was updated successfully, but these errors were encountered: