On 07/26/2013 05:15 PM, Michal Romaniuk wrote: > So I followed the advice from Andreas but now I get this error when > calling clone: > > PATH/scikit-learn/sklearn/base.pyc in clone(estimator, safe) > 66 and param1.dtype == param2.dtype > 67 # We have to use '.flat' for 2D arrays > ---> 68 and param1.flat[0] == param2.flat[0] > 69 and param1.flat[-1] == param2.flat[-1] > 70 ) > > ValueError: The truth value of an array with more than one element is > ambiguous. Use a.any() or a.all() > > I think that this could be because one of the parameters of __init__ is > a numpy array of objects, containing numeric numpy arrays. My first reaction would be that you have a weird interface. __init__ should really only take parameters of the model, not data.
If indeed you need to initialize a model this way, maybe we should change our code to allow that? I'm not entirely sure what is going on there.... ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
