Either way, is there a reason that I'm missing, why np.array([0]) should be both C- and F-contiguous, but np.array([[0]]) can only be one of them at a time?
On Aug 2, 2012, at 17:26 , Olivier Grisel <[email protected]> wrote: > 2012/8/2 Skipper Seabold <[email protected]>: >> On Thu, Aug 2, 2012 at 11:05 AM, Olivier Grisel >> <[email protected]> wrote: >>> 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. >> >> Are you supporting 1.3.0? I'm curious when this was fixed in numpy. > > We are still supporting 1.3 indeed, this jenkins build job runs the > lowest supported versions combo: > > https://jenkins.shiningpanda.com/scikit-learn/job/python-2.6-numpy-1.3.0-scipy-0.7.2/ > > -- > 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 ------------------ Vlad N. http://vene.ro ------------------------------------------------------------------------------ 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
