Thanks all...I realized my mistake!!...:)

On 4 April 2013 20:12, Andreas Perstinger <andiper...@gmail.com> wrote:

> Sayan Chatterjee <sayanchatter...@gmail.com> wrote:
>
> >I know this error occurs when one tries to multiply a string with a
> >fraction i.e float. In my case , I can't figure out how can a numpy
> >floating point array be a string.
>
> The problem is not that the numpy array is a string but that you append
> the array to a python list:
>
> >  pv_za=[]
> >  pv_za.append(-K*np.sin(K*pv_za_temp))
> >  pv_za_temp = []
> >  pv_za_temp.append(np.array(pv_za))
>
> Both "pv_za" and "pv_za_temp" are python lists to which you append a
> numpy array. But since you delete both lists in each iteration I assume
> you want to just assign a new numpy array to both names:
>
> pv_za = -K * np.sin(K * pv_za_temp)
> pv_za_temp = pv_za # "pv_za" is already a numpy array
>
> Bye, Andreas
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 


--------------------------------------------------------------------------
*Sayan  Chatterjee*
Dept. of Physics and Meteorology
IIT Kharagpur
Lal Bahadur Shastry Hall of Residence
Room AB 205
Mob: +91 9874513565
blog: www.blissprofound.blogspot.com

Volunteer , Padakshep
www.padakshep.org
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to