Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 49626cc

Browse files
authored
filter out numpy 'size changed' warnings (#1601)
1 parent 4fca028 commit 49626cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

allennlp/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
if sys.version_info < (3, 6):
66
raise RuntimeError("AllenNLP requires Python 3.6 or later")
77

8+
# We get a lot of these spurious warnings,
9+
# see https://github.com/ContinuumIO/anaconda-issues/issues/6678
10+
import warnings
11+
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
12+
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
13+
814
try:
915
# On some systems this prevents the dreaded
1016
# ImportError: dlopen: cannot load any more object with static TLS

0 commit comments

Comments
 (0)