Module 'Numpy' Has No Attribute Linespace [Closed]

Module 'Numpy' Has No Attribute Linespace [Closed]

I tried this piece of code but it kept giving me the same error. I'm sure I have no other script named numpy in the directory. I have tried uninstalling and reinstalling it but nothing works.

import numpy as np; from numpy import pi
theta = np.linespace(-np.pi, np.pi, 100)

When ran, it returned module 'numpy' has no attribute 'linespace'. In fact, no other modules works, any idea why?

2

1 Answer

Its np.linspace() instead of np.linespace().

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.