Tutorial Example

Fix TensorFlow FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy

When you are running tensorflow application, you may find this warning: FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future version of numpy. How to fix this warning? In this tutorial, we will introduce you some steps, you can fix this warning by following our tutorial.

Why this warning occur?

This warning may like:

When numpy version is incompatible with tensorflow, this warning will occur?

How to fix this warning?

You should make numpy is compatible with tensorflow.

1. Check the numpy version

You can read this tutorial to know how to check current numpy version.

Python Get NumPy Version: A Beginner Guide

As to us, the version numpy is 1.17.3

2.Check the tensorflow version

Here is an tutorial.

Print TensorFlow Version for Beginners – TensorFlow Tutorial

As to us, our tensorflow is 1.10.0, which need numpy<=1.14.5,>=1.13.3. So we will install numpy 1.14.2

3.Install numpy 1.14.2

We will use pip command to install

pip install numpy==1.14.2

After you have installed numpy 1.14.2, you run tensorflow application. You will find this warning disappeared.