Open KamodaP opened 7 years ago
You are correct. The documentation states that an instance should be initialized with a built-in one-dimensional python list, e.g. Instance( [0, 1] )
. However, as you pint out there are currently no checks that verify whether the argument is indeed a python list.
I'll add validation check to my todo list, thank you for pointing it out
It is quite common in data science apps to use numpy arrays and pandas dataframes. Unfortunately when you try to create Instance using numpy array of shape (1,x) your code creates in one of the places array of shape (nobs, x, 1) which does not work in dot when multiplied by array of shape (x, nlayers). It could be easily checked with the verify_dataset_shape_and_modify. Here's some snippet:
whith this snippet even accidentally passing arrays of shape (x,1) will work.