We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60736bd commit ac9245aCopy full SHA for ac9245a
torch/__init__.py
@@ -31,6 +31,13 @@
31
# automatically filled by the dynamic loader.
32
import os as _dl_flags
33
34
+# if we have numpy, it *must* be imported before the call to setdlopenflags()
35
+# or there is risk that later c modules will segfault when importing numpy
36
+try:
37
+ import numpy as np
38
+except:
39
+ pass
40
+
41
# first check if the os package has the required flags
42
if not hasattr(_dl_flags, 'RTLD_GLOBAL') or not hasattr(_dl_flags, 'RTLD_NOW'):
43
try:
0 commit comments