Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101155

Re: What meaning is '[: , None]'?

Newsgroups comp.lang.python
Date 2016-01-02 07:41 -0800
References <5607ba13-100b-411c-824a-de80c3c52e33@googlegroups.com>
Message-ID <335bf0cc-b25e-43b6-be0a-94a94ce0eb73@googlegroups.com> (permalink)
Subject Re: What meaning is '[: , None]'?
From Rustom Mody <rustompmody@gmail.com>

Show all headers | View raw


On Saturday, January 2, 2016 at 6:14:24 PM UTC+5:30, Robert wrote:
> Hi,
> 
> I read a code snippet, in which object w_A is:
> 
> 
> w_A
> Out[48]: array([ 0.10708809,  0.94933575,  0.8412686 ,  0.03280939,  0.59985308])
> 
> 
> Then, I don't know what is '[:  ' below:
> vs_A = w_A[:, None] * xs
> 
> 
> I don't find the answer after searching around 
> Could you explain above code to me?
> Thanks,

You probably want to search for 'slice/slicing' and 'indexing'
I get this
http://docs.scipy.org/doc/numpy-1.10.0/reference/arrays.indexing.html

[Note: I dont know much about this]

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

What meaning is '[: , None]'? Robert <rxjwg98@gmail.com> - 2016-01-02 04:44 -0800
  Re: What meaning is '[: , None]'? Steven D'Aprano <steve@pearwood.info> - 2016-01-03 02:39 +1100
  Re: What meaning is '[: , None]'? Rustom Mody <rustompmody@gmail.com> - 2016-01-02 07:41 -0800

csiph-web