Skip to content

Commit

Permalink
Fixed Vispy Error on 64bit systems (6.6)
Browse files Browse the repository at this point in the history
Added .astype(np.float32) at the end of the array generation.
  • Loading branch information
j9ac9k committed May 15, 2015
1 parent dddae06 commit 9233b50
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions notebooks/chapter06_viz/06_vispy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"collapsed": false
},
Expand All @@ -64,7 +64,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {
"collapsed": false
},
Expand All @@ -82,7 +82,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {
"collapsed": false
},
Expand All @@ -106,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {
"collapsed": false
},
Expand All @@ -129,7 +129,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {
"collapsed": false
},
Expand All @@ -147,15 +147,27 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'float32' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\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",
"\u001b[1;31mNameError\u001b[0m: name 'float32' is not defined"
]
}
],
"source": [
"program['a_position'] = np.c_[\n",
" np.linspace(-1.0, +1.0, 1000),\n",
" np.random.uniform(-0.5, +0.5, 1000)]"
" np.linspace(-1.0, +1.0, 1000, dtype=float32),\n",
" np.random.uniform(-0.5, +0.5, 1000, dtype=float32)]"
]
},
{
Expand Down Expand Up @@ -244,7 +256,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.2"
"version": "3.4.1"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 9233b50

Please sign in to comment.