[issue28302] Unpacking numpy array give list

2016-09-28 Thread R. David Murray
R. David Murray added the comment: Yes, you are unpacking into a list, that's what the * syntax does in this context. Since the rhs can be a mix of types, there's really no other reasonable meaning for the syntax. (The same is true for tuples, by the way). -- components: +Regular Exp

[issue28302] Unpacking numpy array give list

2016-09-28 Thread SilentGhost
SilentGhost added the comment: It doesn't matter what you're unpacking, *y will collect the unpacked elements into a list. -- components: +Interpreter Core -Regular Expressions nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _

[issue28302] Unpacking numpy array give list

2016-09-28 Thread RAMESH PAMPANA
New submission from RAMESH PAMPANA: Unpacking numpy array gives list rather numpy array. >>> import numpy as np >>> a = np.array([1,2,3,4]) >>> x, *y, z = a >>> type(a) >>> type(y) > >> type(x) -- components: Regular Expressions messages: 277622 nosy: ezio.melotti, mrabarnett, rpampan