From 98a7150c65c9bd8071bd13e3d89d10e7ce9a8b6e Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Thu, 9 Aug 2018 06:37:42 +0300 Subject: [PATCH] dvc: ignore unraleted numpy runtime warnings Signed-off-by: Ruslan Kuprieiev --- dvc/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dvc/__init__.py b/dvc/__init__.py index 4ba2bf85e..d4d89d1f5 100644 --- a/dvc/__init__.py +++ b/dvc/__init__.py @@ -4,6 +4,8 @@ DVC Make your data science projects reproducible and shareable. """ import os +import warnings + VERSION_BASE = '0.16.6' __version__ = VERSION_BASE @@ -47,3 +49,11 @@ else: pass VERSION = __version__ + + +# Ignore numpy's runtime warnings: https://github.com/numpy/numpy/pull/432. +# We don't directly import numpy, but our dependency networkx does, causing +# these warnings in some environments. Luckily these warnings are benign and +# we can simply ignore them so that they don't show up when you are using dvc. +warnings.filterwarnings("ignore", message="numpy.dtype size changed") +warnings.filterwarnings("ignore", message="numpy.ufunc size changed")