Created
May 4, 2014 16:27
-
-
Save kain88-de/11519450 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"metadata": {}, | |
"cell_type": "code", | |
"input": "%load_ext cythonmagic", | |
"prompt_number": 1, | |
"outputs": [], | |
"language": "python", | |
"trusted": true, | |
"collapsed": false | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "code", | |
"input": "import cython\nprint cython.__version__", | |
"prompt_number": 9, | |
"outputs": [ | |
{ | |
"output_type": "pyout", | |
"prompt_number": 9, | |
"metadata": {}, | |
"text": "'0.20.1'" | |
} | |
], | |
"language": "python", | |
"trusted": true, | |
"collapsed": false | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "code", | |
"input": "%%cython\nfrom cython cimport floating\n\ndef foo(floating bar):\n cdef floating foobar = 2*bar\n return foobar", | |
"prompt_number": 4, | |
"outputs": [], | |
"language": "python", | |
"trusted": true, | |
"collapsed": false | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "code", | |
"input": "%%cython\nfrom cython cimport floating\n\ndef foo_2(float bar):\n cdef floating foobar = 2*bar\n return foobar", | |
"prompt_number": 14, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stderr", | |
"text": "\nError compiling Cython file:\n------------------------------------------------------------\n...\nfrom cython cimport floating\n\ndef foo_2(float bar):\n cdef floating foobar = 2*bar\n ^\n------------------------------------------------------------\n\n/home/mlinke/.cache/ipython/cython/_cython_magic_3cb9a0a2882144c8b50aed8893b976c4.pyx:4:28: Cannot coerce to a type that is not specialized\n\nError compiling Cython file:\n------------------------------------------------------------\n...\nfrom cython cimport floating\n\ndef foo_2(float bar):\n cdef floating foobar = 2*bar\n return foobar\n ^\n------------------------------------------------------------\n\n/home/mlinke/.cache/ipython/cython/_cython_magic_3cb9a0a2882144c8b50aed8893b976c4.pyx:5:17: Type is not specialized\n\nError compiling Cython file:\n------------------------------------------------------------\n...\nfrom cython cimport floating\n\ndef foo_2(float bar):\n cdef floating foobar = 2*bar\n ^\n------------------------------------------------------------\n\n/home/mlinke/.cache/ipython/cython/_cython_magic_3cb9a0a2882144c8b50aed8893b976c4.pyx:4:9: Invalid use of fused types, type cannot be specialized\n" | |
} | |
], | |
"language": "python", | |
"trusted": true, | |
"collapsed": false | |
} | |
], | |
"metadata": {} | |
} | |
], | |
"metadata": { | |
"gist_id": "11519450", | |
"name": "", | |
"signature": "sha256:c8fe62c39838425c7568eef5b1ed2bd2d5bc903e22e691a8c428a71a8a576456" | |
}, | |
"nbformat": 3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment