On 8/2/2012 6:05 AM, Brian Holt wrote:
> Hi list,
>
> I'm refactoring the tree module to introduce lazy argsorting and my
> unit tests are failing with:
>
>      Exception ValueError: ValueError(u'ndarray is not Fortran
> contiguous',) in 'sklearn.tree._tree.Tree.recursive_partition' ignored
>
> I think I've pinned down the problem to this minimal sample:
>
>>>> import numpy as np
>>>> X = np.array([[0]])
>>>> a = np.asfortranarray(X)
>>>> a.flags
>    C_CONTIGUOUS : True
>    F_CONTIGUOUS : False
>    OWNDATA : True
>    WRITEABLE : True
>    ALIGNED : True
>    UPDATEIFCOPY : False
>
> Is this a bug in numpy? And if so, is there any workaround?
>
> Regards
> Brian

Hi Brian,

Here are the results for my setup:

 >>> sys.version
'2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]'
 >>> import numpy
 >>> numpy.__version__
'1.6.2'
 >>> x = numpy.array([0])
 >>> a = numpy.asfortranarray(x)
 >>> a.flags
   C_CONTIGUOUS : True
   F_CONTIGUOUS : True
   OWNDATA : True
   WRITEABLE : True
   ALIGNED : True
   UPDATEIFCOPY : False






>
> ------------------------------------------------------------------------------
> 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


------------------------------------------------------------------------------
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