[scikit-learn] numpy.amin behaviour with multidimensionnal arrays

Juan Nunez-Iglesias jni.soma at gmail.com
Thu Dec 29 17:32:45 EST 2016


Hi Greg,

I don't know how specific it is to NumPy, but that's definitely the correct way to talk about it in NumPy, and your understanding in your example is spot-on. This is true of many NumPy functions.

Juan.

On 30 Dec. 2016, 9:08 AM +1100, greg g <greg315 at hotmail.fr>, wrote:
> Thanks
> Is this a numpy specific terminology ?
> For a multidimensionnal array with dimension=n and size l1 x l2 x ... x ln, does "along axis=0" mean that l2 x..x ln operations are performed scrolling first dimension, each operation on l1 elements,  and that an array with dimension n-1 and size l2 x..x ln containing the operations results is returned?
> ( Finally I'm not sure this sentence really clarify ... ;-) )
>
> De : scikit-learn <scikit-learn-bounces+greg315=hotmail.fr at python.org> de la part de Jacob Schreiber <jmschreiber91 at gmail.com>
> Envoyé : jeudi 29 décembre 2016 20:22
> À : Scikit-learn user and developer mailing list
> Objet : Re: [scikit-learn] numpy.amin behaviour with multidimensionnal arrays
>
> It means that instead of returning the minimum value anywhere in the entire matrix, it will return the minimum value for each column or each row depending on which axis you put in, so a vector instead of a scalar.
>
> > On Thu, Dec 29, 2016 at 6:00 AM, greg g <greg315 at hotmail.fr> wrote:
> > > Hi,
> > > I would like to understand the behaviour of the scipy.spatial.kdtree class that uses numpy.amin function.
> > > In the numpy.amin description, we find that it returns the "minimum value along a given axis"
> > > What does it mean exactly ?
> > >
> > > Thanks for any help
> > > Gregory
> > >
> > >
> > > _______________________________________________
> > > scikit-learn mailing list
> > > scikit-learn at python.org
> > > https://mail.python.org/mailman/listinfo/scikit-learn
> > >
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20161230/e307a439/attachment-0001.html>


More information about the scikit-learn mailing list