Re: [Numpy-discussion] python array

2014-03-14 Thread Sudheer Joseph
0]: bb=b.compressed() In [71]: bb[bb<=4].size Out[71]: 5 with best regards, Sudheer ******* Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO

Re: [Numpy-discussion] python array

2014-03-14 Thread Sudheer Joseph
           mask = [ True  True  True  True False False False False False],       fill_value = 99) On Thu, Mar 13, 2014 at 8:14 PM, Sudheer Joseph wrote: Sorry,            The below solution I thoght working was not working but was just giving array size. ---

Re: [Numpy-discussion] python array

2014-03-13 Thread Sudheer Joseph
how python handles this. with best regards, Sudheer *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpa

Re: [Numpy-discussion] python array

2014-03-13 Thread Sudheer Joseph
Sorry, The below solution I thoght working was not working but was just giving array size. On Fri, 14/3/14, Sudheer Joseph wrote: Subject: Re: [Numpy-discussion] python array To: "Discussion of Numerical Python" Date: Friday

Re: [Numpy-discussion] python array

2014-03-13 Thread Sudheer Joseph
] > [-- -- --] > [-- -- --]] > > print abs(r2010)[:3,:3] > [[-- -- --] > [-- -- --] > [-- -- --]] > > > print r2010[ r2010[:3,:3] <0 ] > [-- -- -- -- -- -- -- -- --] > > print r2010[ abs(r2010)[:3,:3] < 0] > [] > > Nicolas

Re: [Numpy-discussion] Getting masked array boundary indices

2013-11-27 Thread Sudheer Joseph
Thank you, Though it did not get what I expected it is a strong clue, let me explore it, With. Best regards Sudheer___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Getting masked array boundary indices

2013-11-27 Thread Sudheer Joseph
False then" index =i, but I am not getting the pythonic way to  get this done. with best regards, Sudheer   ******* Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX N

Re: [Numpy-discussion] strange behavior of variable

2013-08-18 Thread Sudheer Joseph
Tank you, It worked fine, with best regards, Sudheer From: Nathaniel Smith To: Discussion of Numerical Python >Sent: Sunday, 18 August 2013 3:01 PM >Subject: Re: [Numpy-discussion] strange behavior of variable > > > >Try: >np.argsort(a)[-n:] >-n >On 18 Aug 2013 10:

Re: [Numpy-discussion] strange behavior of variable

2013-08-18 Thread Sudheer Joseph
smartness of python!!, I am just climbing the bottom steps... >with best regards, >Sudheer > > > >  >******* >Sudheer Joseph >Indian National Centre for Ocean Information Services >Ministry of Earth Sciences, G

Re: [Numpy-discussion] strange behavior of variable

2013-08-18 Thread Sudheer Joseph
Thanks a lot Eric,     Here comes the smartness of python!!, I am just climbing the bottom steps... with best regards, Sudheer   *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of

[Numpy-discussion] strange behavior of variable

2013-08-18 Thread Sudheer Joseph
,  nan])   *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O

Re: [Numpy-discussion] solving matrix

2013-08-10 Thread Sudheer Joseph
Dear Admin, I found the the issue was a silly mistake of difference size of array and now would like to withdraw this post. Is there a way to delete this question. with best regards, Sudheer > > From: Sudheer Joseph >To: Disc

Re: [Numpy-discussion] solving matrix

2013-08-10 Thread Sudheer Joseph
I thought I should add the error I get too. From: Sudheer Joseph To: "numpy-discussion@scipy.org" >Sent: Saturday, 10 August 2013 8:40 PM >Subject: [Numpy-discussion] solving matrix > > > >Dear Experts, >I am trying to write the below piece of matlab code to a

[Numpy-discussion] solving matrix

2013-08-10 Thread Sudheer Joseph
np from numpy import pi,c_,ones,size,cos,sin t=np.arange(1,365.25*5) dt=np.average(np.diff(t)) acyc = 2*pi/(365.25/dt) 365.25/4)/dt) E1=c_[ones(size(t)),cos(acyc*t),sin(acyc*t)] linalg.lstsq(E1,ts) an_fit = E*a with best regards, Sudheer *******

Re: [Numpy-discussion] sampling arrays

2013-06-18 Thread Sudheer Joseph
Thank you  Zachary,    I will try this and see how this goes. with best regards, Sudheer   *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO

Re: [Numpy-discussion] saving 3d array

2013-06-16 Thread Sudheer Joseph
Thank you Camilo, It is indeed an easy way and also the link is a ready to use save method. Thanks a lot for sharing it with best regards, Sudheer   *** Sudheer Joseph Indian National Centre for Ocean Information

Re: [Numpy-discussion] sampling arrays

2013-06-16 Thread Sudheer Joseph
with best regards, Sudheer   *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55

Re: [Numpy-discussion] sampling arrays

2013-06-16 Thread Sudheer Joseph
erical Python > Cc: > Sent: Sunday, 16 June 2013 2:49 PM > Subject: Re: [Numpy-discussion] sampling arrays > > On Sun, 2013-06-16 at 14:48 +0800, Sudheer Joseph wrote: >> Is it possible to sample a 4D array of numpy at given dimensions with >> out writing loops? ie

[Numpy-discussion] sampling arrays

2013-06-15 Thread Sudheer Joseph
all depths with best regards, Sudheer *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad

Re: [Numpy-discussion] saving 3d array

2013-06-15 Thread Sudheer Joseph
Thanks a lot,   Both suggestions helped me and I could save it as below. np.savez('eof_output',eof=eof1.data,pcs=pc1,lags=lags,lons=lons,lats=lats,x=x,y=y,clevs=clevs,eof_mask=eof1.mask) ******* Sudheer Joseph India

Re: [Numpy-discussion] saving 3d array

2013-06-15 Thread Sudheer Joseph
Thank you very much for this tip. Is there a typical way to save masked and the rest separately?. Not much familiar with array handling in numpy. Sudheer ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinf

[Numpy-discussion] saving 3d array

2013-06-15 Thread Sudheer Joseph
pyc in tofile(self, fid, sep, format)    5380    5381 """ -> 5382 raise NotImplementedError("Not implemented yet, sorry...")    5383    5384 def toflex(self): NotImplementedError: Not implemented yet, sorry... *****

[Numpy-discussion] t-statistic

2013-06-12 Thread Sudheer Joseph
if we give number of samples ? t = 2.31# appropriate t value (where n=9, two tailed 95%) with best regards, Sudheer *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of

Re: [Numpy-discussion] array manupulation

2013-05-26 Thread Sudheer Joseph
6825], >   [  99.76081882,   99.51702755,   99.33960611,   99.13057243, >  98.9007987 ], >   [  99.8617198 ,   99.72882047,   99.63273748,   99.51539561, >      99.38460995], >   [ 100.    ,  100.    ,  100.    ,  100.    ,  100.   >  ]]) > >

Re: [Numpy-discussion] array manupulation

2013-05-26 Thread Sudheer Joseph
ize. with best regards, Sudheer. >From:Aronne Merrelli >To:Discussion of Numerical Python >Sent:Sunday, 26 May 2013 2:13 PM >Subject:Re: [Numpy-discussion] array manupulation > > > > > >On Sun, May 26, 2013 at 4:30 AM, Sudheer Joseph >wrote: > >Dear Brian,

Re: [Numpy-discussion] array manupulation

2013-05-25 Thread Sudheer Joseph
nput array dimensions except for the concatenation axis must match exactly   *********** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Prag

Re: [Numpy-discussion] array manupulation

2013-05-25 Thread Sudheer Joseph
> In [9]: np.vstack((np.zeros(10), cc)) > Out[9]: > array([[  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.], >       [  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9.,  10.], >       [  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9.,  10.]]) > > Bryan &

Re: [Numpy-discussion] array manupulation

2013-05-25 Thread Sudheer Joseph
Thank you Brian,                      I was missing the outer brackets.!! with best regards, Sudheer   *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21

[Numpy-discussion] array manupulation

2013-05-25 Thread Sudheer Joseph
     1     2     3     4     5     6     7     8     9    10 wit best regards, Sudheer  ******* Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeeme

Re: [Numpy-discussion] printing array in tabular form

2013-05-11 Thread Sudheer Joseph
printing array in tabular form > > On 10/05/2013 13:20, Sudheer Joseph wrote: > >> Hi, >> I am trying to learn Python after feeling its utility in coding and >> also reading a bit aboutits potential only, please do not put words >> in to my mouth like below.

Re: [Numpy-discussion] printing array in tabular form

2013-05-11 Thread Sudheer Joseph
rray in tabular form > > On 10.05.2013, at 1:20PM, Sudheer Joseph wrote: > >> If some one has a quick way I would like to learn from them or get a > referecence >> where the formatting part is described which was >> my intention while posting here. As I have been

Re: [Numpy-discussion] printing array in tabular form

2013-05-11 Thread Sudheer Joseph
Thank you very much,   These tips with some effort from me should do it for me. with best regards, Sudheer   *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Sudheer Joseph
>Subject: Re: [Numpy-discussion] printing array in tabular form > > >On 10/05/2013 11:14, Sudheer Joseph wrote: > >> However writing a formatted out put looks to be bit tricky with >> python relative to other programing languages. > >... > >> I was lo

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Sudheer Joseph
Thank you,   But I was looking for  a format statement likw write(*,"(A,5F8.3)") with best regards, Sudheer   ******* Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences

Re: [Numpy-discussion] printing array in tabular form

2013-05-10 Thread Sudheer Joseph
np.savetxt can save it in a file and there is no option like write a string and then leave space and then write the array in above fashion. I searched for a while but could not get any solution. with best regards, Sudheer *** Sudheer Joseph

Re: [Numpy-discussion] printing array in tabular form

2013-05-09 Thread Sudheer Joseph
come and a userfriendly formatted out put method for pyton will evolve. IL= 1,2,3,4,5     5,5,6,8,0 JL= 1,2,3,4,5     5,5,6,8,0 KL= 1,2,3,4,5     5,5,6,8,0 with best regards, Sudheer   *** Sudheer Joseph Indian National Centre

Re: [Numpy-discussion] printing array in tabular form

2013-05-07 Thread Sudheer Joseph
ject has no attribute 'reshape' with best regards, Sudheer  ******* Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,K

[Numpy-discussion] printing array in tabular form

2013-05-07 Thread Sudheer Joseph
enddo   end   ******* Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-

Re: [Numpy-discussion] Numpy correlate

2013-03-19 Thread Sudheer Joseph
, Sudheer Joseph a écrit : Dear Numpy/Scipy experts, >                                              Attached is a script which I >made to test the numpy.correlate ( which is called py plt.xcorr) to see how >the cross correlation is calculated. From this it appears the if i call >plt.x

Re: [Numpy-discussion] Numpy correlate

2013-03-19 Thread Sudheer Joseph
erated/statsmodels.tsa.stattools.acf.html >  >http://statsmodels.sourceforge.net/devel/generated/statsmodels.graphics.tsaplots.plot_acf.html These may not work for me.   ******* Sudheer Joseph Indian National Centre for Ocean Information Services Minis

[Numpy-discussion] Numpy correlate

2013-03-14 Thread Sudheer Joseph
      *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-40

Re: [Numpy-discussion] reshaping arrays

2013-03-04 Thread Sudheer Joseph
, Sudheer Joseph wrote: Hi Brad, >                I am not getting the attribute reshape for the array, are you >having a different version of numpy than mine? > > >I have  >In [55]: np.__version__ >Out[55]: '1.7.0' >and detail of the shape > > >det

Re: [Numpy-discussion] reshaping arrays

2013-03-02 Thread Sudheer Joseph
rror: reshape   ******* Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-

Re: [Numpy-discussion] reshaping arrays

2013-03-02 Thread Sudheer Joseph
Thank you Brad, for the quick reply with solution, special thanks to the link for matlab users. with best regards, Sudheer   *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of

[Numpy-discussion] reshaping arrays

2013-03-02 Thread Sudheer Joseph
Hi all,         For a 3d array in matlab, I can do the below to reshape it before an eof analysis. Is there a way to do the same using numpy? Please help. [nlat,nlon,ntim ]=size(ssh); tssh=reshape(ssh,nlat*nlon,ntim); and afterwards eofout=[] eofout=reshape(eof1,nlat,nlon,ntime) with best regards