2012/8/2 Olivier Grisel <[email protected]>:
> 2012/8/2 Jim Vickroy <[email protected]>:
>> On 8/2/2012 8:27 AM, Brian Holt wrote:
>>> Thanks Jim,
>>>
>>> Could you try it again with
>>>
>>> X = np.array([[0]])
>>>
>>> Note the double "[" bracket - this is what causes the problem for me.
>
> I can reproduce it too. Sounds like a numpy bug to me. We can have a
> helper in scikit that works around the
>
> from sklearn.util.fixes import check_fortran
>
> that checks the flags with a special exception with (1, 1) shaped arrays.

Actually no I cannot reproduce it:

In [15]: np.asfortranarray(np.array([[0]])).flags
Out[15]:
  C_CONTIGUOUS : False
  F_CONTIGUOUS : True
  OWNDATA : True
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False

In [16]: np.__version__
Out[16]: '1.6.2'

So maybe it's fixed somewhere between the version used by Brian and
1.6.2. In that case it would still be interesting to factorize a
compat workaround in sklearn.util.fixes.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to