I have one more question on numpy python module syntax, which I would like to convert into regular python 2.7 syntax. Here is the numpy version:
if any((var.theta < 0) | (var.theta >= 90)):
print('Input incident angles <0 or >=90 detected For input angles with absolute value greater than 90, the ' + 'modifier is set to 0. For input angles between -90 and 0, the ' + 'angle is changed to its absolute value and evaluated.')
var.theta[(var.theta < 0) | (var.theta >= 90)]=abs((var.theta < 0) | (var.theta >= 90))
source code: https://github.com/Sandia-Labs/PVLIB_Python/blob/master/pvlib/pvl_physicaliam.py#L93-95
If we pretend that numpy arrays are one dimensional, would regular python 2.7 syntax look something like this:
newTheta = []
for item in var.theta:
if (item < 0) and (item >= 90):
print('Input incident angles <0 or >=90 detected For input angles with absolute value greater than 90, the ' + 'modifier is set to 0. For input angles between -90 and 0, the ' + 'angle is changed to its absolute value and evaluated.')
newItem = abs(item)
newTheta.append(newItem)
?? Thank you for the reply.