Skip to content Skip to sidebar Skip to footer

Unknown Librarie When Modularize Code Python

I try to modularize my python code . In my main code the notebook, I insert this : import numpy as np import pandas as pd from pandas import DataFrame import my_math df['std_line_

Solution 1:

Try to import numpy also in external .py so:

import numpy as np
def feature_std_normalize(f):
    return (f - mu) / std

def feature_log_normalize(f):
   # return (f - mu) / std
    return np.log(f+1)

Solution 2:

make sure you installed NumPy for Python 3, you may have used the installation for Python 2 in your previous code. Hope this helps


Post a Comment for "Unknown Librarie When Modularize Code Python"