Skip to content

Commit 87dab4e

Browse files
committed
Whops, committed too early
Commit 9233b50 was made incorrectly, now corrected
1 parent 9233b50 commit 87dab4e

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

notebooks/chapter06_viz/06_vispy.ipynb

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -147,27 +147,15 @@
147147
},
148148
{
149149
"cell_type": "code",
150-
"execution_count": 7,
150+
"execution_count": 8,
151151
"metadata": {
152152
"collapsed": false
153153
},
154-
"outputs": [
155-
{
156-
"ename": "NameError",
157-
"evalue": "name 'float32' is not defined",
158-
"output_type": "error",
159-
"traceback": [
160-
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
161-
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
162-
"\u001b[1;32m<ipython-input-7-b8fd95d97318>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m program['a_position'] = np.c_[\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlinspace\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m+\u001b[0m\u001b[1;36m1.0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m1000\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mfloat32\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 3\u001b[0m np.random.uniform(-0.5, +0.5, 1000, dtype=float32)]\n",
163-
"\u001b[1;31mNameError\u001b[0m: name 'float32' is not defined"
164-
]
165-
}
166-
],
154+
"outputs": [],
167155
"source": [
168156
"program['a_position'] = np.c_[\n",
169-
" np.linspace(-1.0, +1.0, 1000, dtype=float32),\n",
170-
" np.random.uniform(-0.5, +0.5, 1000, dtype=float32)]"
157+
" np.linspace(-1.0, +1.0, 1000).astype(np.float32),\n",
158+
" np.random.uniform(-0.5, +0.5, 1000).astype(np.float32)]"
171159
]
172160
},
173161
{
@@ -179,7 +167,7 @@
179167
},
180168
{
181169
"cell_type": "code",
182-
"execution_count": null,
170+
"execution_count": 9,
183171
"metadata": {
184172
"collapsed": false
185173
},
@@ -199,7 +187,7 @@
199187
},
200188
{
201189
"cell_type": "code",
202-
"execution_count": null,
190+
"execution_count": 10,
203191
"metadata": {
204192
"collapsed": false
205193
},
@@ -220,7 +208,7 @@
220208
},
221209
{
222210
"cell_type": "code",
223-
"execution_count": null,
211+
"execution_count": 11,
224212
"metadata": {
225213
"collapsed": false
226214
},

0 commit comments

Comments
 (0)