<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nemenmanlab.org/~ilya/index.php?action=history&amp;feed=atom&amp;title=Physics_212%2C_2017%3A_Lab_4</id>
	<title>Physics 212, 2017: Lab 4 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nemenmanlab.org/~ilya/index.php?action=history&amp;feed=atom&amp;title=Physics_212%2C_2017%3A_Lab_4"/>
	<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2017:_Lab_4&amp;action=history"/>
	<updated>2026-05-17T09:39:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2017:_Lab_4&amp;diff=681&amp;oldid=prev</id>
		<title>Ilya: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2017:_Lab_4&amp;diff=681&amp;oldid=prev"/>
		<updated>2018-07-04T16:28:44Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:28, 4 July 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Ilya</name></author>
		
	</entry>
	<entry>
		<id>https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2017:_Lab_4&amp;diff=680&amp;oldid=prev</id>
		<title>nemenman&gt;Ilya at 19:35, 9 February 2017</title>
		<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_212,_2017:_Lab_4&amp;diff=680&amp;oldid=prev"/>
		<updated>2017-02-09T19:35:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PHYS212-2017}}&lt;br /&gt;
&lt;br /&gt;
We are playing even more with Python now!&lt;br /&gt;
&lt;br /&gt;
#Python Student Guide, Ch 2.4, 2.5, 2.6, 2.7, and 3.all&lt;br /&gt;
#Python Student Guide, Ch 5.1 and 5.8&lt;br /&gt;
#Python Student Guide, Ch 4 -- first lab&lt;br /&gt;
&lt;br /&gt;
If you have completed this, convince yourself that memory pre-allocation and vector math make things faster. For this:&lt;br /&gt;
# Try to calculate sine of a very long array element by element in a for loop, or on a whole array at once. Which one is faster and why?&lt;br /&gt;
# Create a 1000x1000 matrix of numbers from 1 to 1,000,000 three different ways: (i) a single range, sliced as a matrix, (ii) a pre-allocated matrix, filled up by a double for loop, and (iii) 1000 bumpy arrays created as ranges (1...1000), (1001...2000), etc. and stacked on top of each other as a vstack in a for loop. Which one is faster and why?&lt;br /&gt;
&lt;br /&gt;
Finally also check what is faster: using np.arange vs. range when defining a for loop. For this, make a very long for loop that does nothing, and see how long it takes. What is faster and why?&lt;/div&gt;</summary>
		<author><name>nemenman&gt;Ilya</name></author>
		
	</entry>
</feed>