I have defined a function
myfunc inside a python file
myfile. when i import this function from a jupyter notebook, it is showing the following error:
import numpy as np import os from scipy.misc import imread import ast from myfile import myfunc ..... class_mask = np.equal(image, i) class_mask = class_mask.astype(np.float32) ..... AttributeError: 'NotImplementedType' object has no attribute 'astype'
However, whenever I have the
myfile content in a cell and running inside the jupyter, it is working without any problem? What is the reason for this error?