fork download
  1. from numpy import zeros, array, sin, pi
  2. djn = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  3. djn = array(djn)
  4.  
  5. def test(djn):
  6. M = len(djn)
  7. delta = zeros(M, float)
  8. delta[0:M] = 0.409279709 * sin(((2*pi)/365)*(284+djn[0:M]))
  9. return delta
  10.  
  11. res = test(djn)
  12. print(res)
Success #stdin #stdout 0.19s 27196KB
stdin
Standard input is empty
stdout
[-0.40162883 -0.40021348 -0.39867955 -0.39702748 -0.39525776 -0.39337092
 -0.39136751 -0.38924813 -0.38701341 -0.38466401]