Oct-14-2021, 05:53 PM
Hello everybody, i have some questions regarding the following code in python:
secondly, for in the last line means that we set these values x_i.... for the variable of name?
lastly, site in sites.items means every item in sites will be placed in variable: Site ??
localWinds = {name: site.local_wind(x_i=site.initial_position[:,0], # x position y_i = site.initial_position[:,1], # y position h_i=site.initial_position[:,0]*0+70, # height ws=None, # defaults to 3,4,..,25 wd=None, # defaults to 0,1,...,360 ) for name, site in sites.items()}firstly I want to know what is the function of {name:.....}? why we used it here?
secondly, for in the last line means that we set these values x_i.... for the variable of name?
lastly, site in sites.items means every item in sites will be placed in variable: Site ??