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
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.
---
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
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
]
> [-- -- --]
> [-- -- --]]
>
> print abs(r2010)[:3,:3]
> [[-- -- --]
> [-- -- --]
> [-- -- --]]
>
>
> print r2010[ r2010[:3,:3] <0 ]
> [-- -- -- -- -- -- -- -- --]
>
> print r2010[ abs(r2010)[:3,:3] < 0]
> []
>
> Nicolas
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
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
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:
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
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
, 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
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
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
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
*******
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
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
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
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
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
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
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
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...
*****
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
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.
> ]])
>
>
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,
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
> 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
&
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
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
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.
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
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
>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
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
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
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
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
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-
, 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
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
***
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
, 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
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-
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
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
45 matches
Mail list logo