[Numpy-discussion] The problem with zero dimesnsional array
yogesh karpate
yogeshkarpate at gmail.com
Mon Sep 28 17:02:48 EDT 2009
Dear All,
I'm facing a bog problem in following . the code snippet is
as follows
#################### % Compute the area
indicator###################################
for kT in range(leftbound,rightbound):
# Here the left bound and rightbound both are indexing array is
cutlevel = sum(s[(kT-ptwin):(kT+ptwin)],0)/(ptwin*2+1)
corsig = s[(kT-swin+1):kT]-cutlevel
areavalue1 =sum((corsig),0)
#print areavalue.size
print leftbound, rightbound
Tval=areavalue1[leftbound:rightbound]
Everything works fine till areavalue1, then whenever I try to access the
Tval=areavalue1[leftbound:rightbound]
it says IndexError: invalid index to scalar variable..
When i try to access areavalue1[0] it gives me entire array but for
areavalue1[2:8]..it gives the same error .
Thanx in advance..
Regards
ymk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090929/e00ba6ca/attachment.html>
More information about the NumPy-Discussion
mailing list