Along with a book I was provided with a Python program, into which I am digging deep now.
The program uses a global data structure named globdat, in a specific routine a numpy array inside globdat is assigned to a local variable:
a = globdat.array
Then in a following while loop the variable a is updated every iteration according to:
a[:] += da[:]
The result of this operation is that globdat.array is updated, which is used in subsequent operations.
Is the usage of [:] required here, or is it merely used to indicate that it also clones into globdat.array? Can anyone clarify this coding style?