« numpy.tile and numpy.newaxis for matlab repmat behavior | トップページ | CythonでGCCがNumPyのCヘッダーを見つけられない場合 »

2011年8月19日 (金)

list slicing in python: get till the last item

Google翻訳を使用してポストの2番目のテスト

メインテキスト

私は多くの場合、MATLAB上のPythonとnumpyのでスライスに混乱する。

のようなpythonのリスト:
B=['TEST1'、'TEST2'、'TEST3']

B[-1]が印刷されます
"TEST3"

私は、2番目のアイテムと以降を取得したい
が、b[0:-1]が印刷されます
['TEST1'、'test2は']
私のTEST3はどこです!これは範囲のようです(3)[0、1、2]が返されます。

私は実際に実行する必要があります
B[1:]
['TEST2'、'TEST3']

私は、機械翻訳 が好きです

[Original input]
main text
I often get confused about the slicing in python and numpy over MATLAB.

python list like:
b = ['test1','test2', 'test3']

b[-1] will print
'test3'

I want to get 2nd item and onwards,
but b[0:-1] will print
['test1', 'test2']
where is my test3!  This is like range(3) will return [0, 1, 2].

i actually should do
b[1:]
['test2', 'test3']

« numpy.tile and numpy.newaxis for matlab repmat behavior | トップページ | CythonでGCCがNumPyのCヘッダーを見つけられない場合 »

Python」カテゴリの記事

見栄」カテゴリの記事

英語」カテゴリの記事

コメント

https://www.wholesaleadidas.us.com/
https://www.nikeairforceones.us.org/
https://www.nikewholesale.us.org/
https://www.nikefoampositeacghyperdunk.us.com/
https://www.newjordans.us.org/
https://www.jordan11s.us.org/
https://www.wholesalejerseyscheap.us.org/
https://www.nikeairforces.us.com/
https://www.jordan24.us/
https://www.jordan15.us/
https://www.jordan11concordshoes.us/
https://www.nikeoffwhite.us.org/
https://www.jordan11lowretro.us/
https://www.wholesalejordansfactory.us/
https://www.nikeblackfridaycybermonday.us.org/
https://www.shoeswholesalesuppliers.us/
https://www.jordan1.us.org/
https://www.cheapjordansshoessale.us/
https://www.michaeljordan-shoes.us/
https://www.jordans32.us/
https://www.cheapjordanshoessuppliers.us.org/
https://www.jordan16.us/
https://www.nikeshoesoutletstoreonlineshopping.us.com/
https://www.wholesaleshoesclothing.us/
https://www.nikeairzoom.us.com/
https://www.shoesstores.ca/
https://www.jordan2s.us/
https://www.jordans12.us/
https://www.jordan21.us/
https://www.wholesaleshoessneakers.us/
https://www.nikejordan1.us.com/
https://www.jordanshoess.us.org/
https://www.airforce1s.us.org/
https://www.jordanswholesale.us.org/
https://www.nmdr1.us.com/
https://www.pandora-jewelrysite.us/
https://www.nikesbdunk.us.com/
https://www.jordan20.us/
https://www.nikestoresfactory.us.com/
https://www.jordan6s.us/
https://www.pandorasbracelets.us/
https://www.jordans13shoes.us/
https://www.jordans33.us/
https://www.christianslouboutin.us.org/
https://www.jordan19.us/
https://www.airjordan33.us/
https://www.yeezyadidas.com.co/
https://www.cheapadidasshoes.us.org/
https://www.shoesshop.ca/
https://www.canadashoesoutlet.ca/
https://www.newnikesshoes.us.org/
https://www.nikemetcons.us.com/
https://www.pandorajewelrycharmscanada.ca/
https://www.nikezoomshoes.us.com/
https://www.huaraches.us.org/
https://www.diorjordans.us/
https://www.pandorajewelrycz.us/
https://www.nikeairmax270s.us.com/
https://www.nikeslidessandalsslipers.us.com/
https://www.nikeoutlet-store.us.org/
https://www.adidasoutletstore.us.org/
https://www.christianlouboutinshoess.us.com/
https://www.air-max2019.us.org/
https://www.nike-outlets.us.com/
https://www.kidsjordans.us/
https://www.nikeepicreactuptempo.us.org/
https://www.huaracheshoes.us.com/
https://www.airmax720.us.org/
https://www.airjordan-retros.us/
https://www.jordans23.us/
https://www.newnikesneakers.us.org/
https://www.jordans14.us/
https://www.nikeairmaxs.us.org/
https://www.retro12.us/
https://www.nikefree.us.org/
https://www.nikecortezshox.us.org/
https://www.nikeoutletshoes.us.org/
https://www.nikeairjordan.us.org/
https://www.nbastorecanada.ca/
https://www.redbottomslouboutinshoes.us.org/
https://www.airjordanretro.us.org/
https://www.pandorajewelryofficialsites.us/
https://www.nikesnew.us.com/
https://www.wholesalenikeshoesonline.us.com/
https://www.jordan17.us/
https://www.jordan31.us/
https://www.nikeairforce1s.us.org/
https://www.nikeshoesdeals.us.com/
https://www.wholesalejordans.us.org/
https://www.yeezysboost350v2.us.org/
https://www.jordan-12.us.org/
https://www.jordan22.us/
https://www.airjordans11retro.us/
https://www.pandoraa.us/
https://www.cheapshoeswholesalefreeshipping.us/
https://www.nikeairmaxs-270.us.com/
https://www.jordan33.us.org/
https://www.adidasyeezywebsite.us.org/
https://www.cheapjerseyswholesale.ca/
https://www.nflshoponline.ca/
https://www.nikeshoesstores.us.com/
https://www.nikerosheblazer.us.org/
https://www.jordan25.us/
https://www.toddlerbabyinfantjordans.us/
https://www.cheapshoeswholesalefromchina.us/
https://www.nikeshoescheap.us.org/
https://www.nikeairforce1.us.org/
https://www.nikeair-force1.us.org/
https://www.jordan5whatthe.us/
https://www.mlbjerseysshop.ca/
https://www.nikeshoesformens.us.com/
https://www.nikecanadashoesshop.ca/
https://www.jordan30.us/
https://www.nikesneakerss.us.com/
https://www.wholesalenikeshoesclothing.us.com/
https://www.jordans28.us/
https://www.adidasstoreoutlet.us.com/
https://www.nikeairhuaraches.us.com/
https://www.nikesoutletstore.us.com/
https://www.nike-clearance.us.org/
https://www.nhljerseysstore.ca/
https://www.nikerunningshoesforwomen.us.com/
https://www.nikesoutlet.us.org/
https://www.jordan29.us/
https://www.nikeshoeswholesale.us.com/
https://www.jordans34.us/
https://www.cheapjordansshoeswholesale.us.org/
https://www.nikewholesalesuppliers.us.com/
https://www.jordan18.us/
https://www.airmaxs.us.org/
https://www.foamposites.us.org/
https://www.officialpandorarings.us/
https://www.jordan26.us/
https://www.jerseysstore.ca/
https://www.jordan35.us/
https://www.nikewomensshoes.us.com/
https://www.nikess.us.com/
https://www.nhlshops.ca/
https://www.jordan-aj1.us/
https://www.cheapjordanswholesalefreeshipping.us/
https://www.lebronsjamesshoes.us.com/
https://www.wholesaleshoescheap.us/
https://www.pandora-jewelry-charms.us/
https://www.airjordans13.us/
https://www.ringspandora.us/
https://www.nikeshops.us.com/
https://www.jordan4.us.org/
https://www.nikerosheblazers.us.com/
https://www.nikeoutletstoreonlines.us.org/
https://www.fjallravenkankenbackpack.us.org/
https://www.officialpandorajewelry.us/
https://www.jordan27.us/
https://www.nike-runningshoes.us.org/
https://www.nikeshoessale.us.org/
https://www.nikerunningshoes.us.org/

コメントを書く

(ウェブ上には掲載しません)

トラックバック


この記事へのトラックバック一覧です: list slicing in python: get till the last item:

« numpy.tile and numpy.newaxis for matlab repmat behavior | トップページ | CythonでGCCがNumPyのCヘッダーを見つけられない場合 »

しろののツイッタータイムライン(凍結中)

オススメたち

2021年7月
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

はてブ

無料ブログはココログ