OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Import "lab_utils_uni could not be resolved

  • Thread starter Thread starter LostJosh
  • Start date Start date
L

LostJosh

Guest
I need help with this Problem: Import "lab_utils_uni" could not be resolved. I installed numpy and matplotlib but lab_utils_uni didnt work. I am working with Visual Studio Code btw.

Code:
import numpy as np
import matplotlib.pyplot as plt
from lab_utils_uni import plt_intuition, plt_stationary, plt_update_onclick, soup_bowl


x_train = np.array([1.0, 2.0])           
y_train = np.array([300.0, 500.0])           

def compute_cost(x, y, w, b): 
    # number of training examples
    m = x.shape[0] 
    
    cost_sum = 0 
    for i in range(m): 
        f_wb = w * x[i] + b   
        cost = (f_wb - y[i]) ** 2  
        cost_sum = cost_sum + cost  
    total_cost = (1 / (2 * m)) * cost_sum  

    return total_cost

    plt_intuition(x_train,y_train)
<p>I need help with this Problem: Import "lab_utils_uni" could not be resolved. I installed numpy and matplotlib but lab_utils_uni didnt work. I am working with Visual Studio Code btw.</p>
<pre><code>import numpy as np
import matplotlib.pyplot as plt
from lab_utils_uni import plt_intuition, plt_stationary, plt_update_onclick, soup_bowl


x_train = np.array([1.0, 2.0])
y_train = np.array([300.0, 500.0])

def compute_cost(x, y, w, b):
# number of training examples
m = x.shape[0]

cost_sum = 0
for i in range(m):
f_wb = w * x + b
cost = (f_wb - y) ** 2
cost_sum = cost_sum + cost
total_cost = (1 / (2 * m)) * cost_sum

return total_cost

plt_intuition(x_train,y_train)
</code></pre>
 

Online statistics

Members online
0
Guests online
4
Total visitors
4
Top