Message308124
| Author | skrah |
|---|---|
| Recipients | Massimiliano Culpo, docs@python, skrah, steven.daprano |
| Date | 2017-12-12.12:46:19 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1513082779.44.0.213398074469.issue32288@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Python lists don't implement extended slices, try numpy arrays: >>> import numpy as np >>> x = array([[1,2,3], [4,5,6]]) >>> x[:, 2] array([3, 6]) >>> >>> lst = [[1,2,3], [4,5,6]] >>> lst[:, 2] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: list indices must be integers or slices, not tuple >>> Was there any issue apart from the extended slices? |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-12-12 12:46:19 | skrah | set | recipients: + skrah, steven.daprano, docs@python, Massimiliano Culpo |
| 2017-12-12 12:46:19 | skrah | set | messageid: <1513082779.44.0.213398074469.issue32288@psf.upfronthosting.co.za> |
| 2017-12-12 12:46:19 | skrah | link | issue32288 messages |
| 2017-12-12 12:46:19 | skrah | create | |