On 18 November 2011 09:31, Gael Varoquaux <[email protected]>wrote:
> On Fri, Nov 18, 2011 at 08:45:59AM +1100, Robert Layton wrote:
> > D = np.abs(X[:, np.newaxis, :] - Y[np.newaxis, :, :])
>
> > * what does putting np.newaxis do here?
>
> It adds an empty axis in the corresponding direction, so that
> broadcasting can work.
>
> This will never work on sparse matrices. If we want this function to work
> on sparse matrix, we will need to write code that is specific to sparse
> matrices.
>
> G
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
That makes sense. I've learnt something new :)
I've asked Denis to note the bug on github, and I'll have a look on the
weekend if I get time.
Thanks,
Robert
--
Public key at: http://pgp.mit.edu/ Search for this email address and select
the key from "2011-08-19" (key id: 54BA8735)
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general