Message308126
I see the first issue now and I agree that Python behaves strangely.
Numpy
=====
>>> x = array([1,2,3])
>>> x[1:2] = [1,2,3,4,5]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: cannot copy sequence with size 5 to array axis with dimension 1
Python
======
>>> lst = [1,2,3]
>>> lst[1:2] = [1,2,3,4,5]
>>> lst
[1, 1, 2, 3, 4, 5, 3] |
|
Date |
User |
Action |
Args |
2017-12-12 13:05:25 | skrah | set | recipients:
+ skrah, steven.daprano, docs@python, Massimiliano Culpo |
2017-12-12 13:05:25 | skrah | set | messageid: <1513083925.1.0.213398074469.issue32288@psf.upfronthosting.co.za> |
2017-12-12 13:05:25 | skrah | link | issue32288 messages |
2017-12-12 13:05:25 | skrah | create | |
|