A colleague of mine ran into this this morning, and I've fixed the
upstream bug in NumPy, but I thought I'd let you guys know in case you
want to put in a workaround.

Basically, if you copy.copy or copy.deepcopy a LinearSVC object (and
probably some other objects where the underlying code relies on
Fortran arrays) things don't go so well when you try to predict() with
the new object. The reason is that as of last few stables and this
morning's master, at any rate, NumPy does this:

>>> copy.deepcopy(numpy.zeros((2, 2), order='F')).flags
  C_CONTIGUOUS : True
  F_CONTIGUOUS : False
  OWNDATA : True
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False

I've fixed it in https://github.com/numpy/numpy/pull/2699

A workaround would be to check flags in predict() and do the necessary
reshuffle if the flags have been botched, but that's kind of a
maintenance headache.

David

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to