kaz-Anova / StackNet

StackNet is a computational, scalable and analytical Meta modelling framework
MIT License
1.32k stars 344 forks source link

Error when trying step 6 of the example #34

Closed qq609299174 closed 7 years ago

qq609299174 commented 7 years ago

Hi, I just run the file make_stacknet_data.py It shows the error as following: Traceback (most recent call last): File "D:/J/stacknet/make_stacknet_data.py", line 113, in main() File "D:/J/stacknet/make_stacknet_data.py", line 104, in main dataset2() File "D:/J/stacknet/make_stacknet_data.py", line 93, in dataset2 fromsparsetofile("dataset2_train.txt", x_train, deli1=" ", deli2=":",ytarget=y_train)
File "D:/J/stacknet/make_stacknet_data.py", line 25, in fromsparsetofile if ytarget!=None: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

I don't understand how it comes.

kaz-Anova commented 7 years ago

Different python version.

Change if ytarget!=None: to if type(ytarget)!=type(None):

goldentom42 commented 7 years ago

Hi there, @kaz-Anova your suggestion works. A more pythonic way would be : if ytarget is not None: Cheers, Olivier

qq609299174 commented 7 years ago

Thanks! Problem solved.