Sep-22-2018, 07:10 AM
zip(*np.where(myarray == 0))
what does the * in front of np denote in a syntax
what does the * in front of np denote in a syntax
Syntax meaning
|
Sep-22-2018, 07:10 AM
zip(*np.where(myarray == 0))
what does the * in front of np denote in a syntax
Sep-22-2018, 08:08 AM
(This post was last modified: Sep-22-2018, 08:08 AM by Gribouillis.)
In general,
func(*param)means that param is a sequence of python objects (eg a list, tuple, ...) and these objects are used as parameters in the call to function func . For exampleparam = [1, 2, 3] func(*param)has the same effect as calling func(1, 2, 3)Calling func(*param) is different from calling func(param) , because the latter calls func with a single list argument, namelyfunc([1, 2, 3]) |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
What's the meaning of this coding? | xin2408 | 7 | 5,818 |
Feb-08-2018, 10:16 PM Last Post: Kebap |