Dear Gary,<div>thank you for the reply. </div><div>I will be more specific and take the same example that you have given and tell you what is my problem -</div><div>array([0.0, 1.3, 2.45, 3.87, 4.54, 5.11, 6.90, 7.78, 8.23, 9.01])</div>

<div>from this array I want to a sub-list with lower and upper indexes that are not present in the above array for example - sub-list[3, 8]</div><div>Is there a function for this?<br>thank you</div><div>niranjan</div><div>
<br></div><div><br>
<div class="gmail_quote">On Thu, Sep 15, 2011 at 10:54 PM, Gary Herron <span dir="ltr"><<a href="mailto:gherron@digipen.edu" target="_blank">gherron@digipen.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>On 09/15/2011 09:40 AM, neeru K wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
Dear Python Users,<br>
I am trying to write a code for visualization (raster plots and peri-event time histogram) of time series electrophysiological data using numpy, scipy and matlplotlib in python. I am importing the data into list using loadtext command.<br>



I was curious if anyone is aware of a function in numpy that can *extract a smaller list containing numbers from a larger list* given the upper and lower limit of the values between which the smaller list lies.<br>
Thank you in advance.<br>
Sincerely,<br>
niranjan<br>
<br>
-- <br>
Niranjan Kambi<br>
Senior Research Fellow,<br>
Neeraj Lab,<br>
National Brain Research Centre,<br>
Manesar, Gurgaon-122050<br>
Haryana, INDIA<br>
Ph:<a href="tel:%2B919818654846" value="+919818654846" target="_blank">+919818654846</a><br>
website:- <a href="http://www.nbrc.ac.in/faculty/neeraj/Lab_webpage/Niranjan_Kambi.html" target="_blank">http://www.nbrc.ac.in/faculty/<u></u>neeraj/Lab_webpage/Niranjan_<u></u>Kambi.html</a><br></div></div>
email:- <a href="mailto:neuro.niru@nbrc.res.in" target="_blank">neuro.niru@nbrc.res.in</a> <mailto:<a href="mailto:neuro.niru@nbrc.res.in" target="_blank">neuro.niru@nbrc.res.in</a><u></u>>, <a href="mailto:neuroniru@gmail.com" target="_blank">neuroniru@gmail.com</a> <mailto:<a href="mailto:neuroniru@gmail.com" target="_blank">neuroniru@gmail.com</a>><br>



<br>
</blockquote>
Do mean to extract a sub-list from a list based on lower and upper indexes into the list?  Python has a standard notation for indicating sub-lists, and numpy implements them:<br>
<br>
>>> a = numpy.array(range(10))<br>
>>> a<br>
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])<br>
>>> a[3:6]<br>
array([3, 4, 5])<br>
<br>
If you mean something else, please be more specific, and we'll try again.<br>
<br>
Gary Herron<br>
<br>
<br>
-- <br>
Gary Herron, PhD.<br>
Department of Computer Science<br>
DigiPen Institute of Technology<br>
<a href="tel:%28425%29%20895-4418" value="+14258954418" target="_blank">(425) 895-4418</a><br><font color="#888888">
<br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-list</a><br>
</font></blockquote></div><br><br clear="all"><div><br></div><br><div></div>

<br>
</div>