user6948979
user6948979

Reputation: 75

Can not find linspace in python3

Just like in python2, I did the following:

import numpy as np
print (np.linspace(2, 3, 4))

Got error:

AttributeError: module 'numpy' has no attribute 'linspace'`

So where do I find linspace()

Upvotes: 1

Views: 9353

Answers (1)

user6948979
user6948979

Reputation: 75

As @Abdou suggested in a comment, the problem was solved when I reinstalled numpy:

sudo python3.6 -m pip install -I numpy

Upvotes: 1

Related Questions