Skip to content

Commit

Permalink
Remove outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Aug 30, 2016
1 parent d719835 commit ebdd8d5
Showing 1 changed file with 44 additions and 65 deletions.
109 changes: 44 additions & 65 deletions doc/examples/basic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"collapsed": false
},
Expand All @@ -30,29 +30,18 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<autowig._scons.ShellSession at 0x7effec9719d0>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"autowig.scons('./basic', 'cpp')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"collapsed": true
},
Expand All @@ -70,7 +59,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"collapsed": false
},
Expand All @@ -92,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"collapsed": false
},
Expand All @@ -111,7 +100,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"collapsed": false
},
Expand All @@ -133,7 +122,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"collapsed": true
},
Expand All @@ -151,71 +140,37 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<autowig._scons.ShellSession at 0x7effec93d1d0>"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"autowig.scons('./basic', 'py')"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'Obtaining file:///home/pfernique/Desktop/AutoWIG/doc/examples/basic\\nInstalling collected packages: basic\\n Running setup.py develop for basic\\nSuccessfully installed basic-1.0.0\\n'"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"import subprocess\n",
"subprocess.check_output(['pip', 'install', '-e', './basic'])"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "TypeError",
"evalue": "No registered converter was able to produce a C++ rvalue of type std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > from this Python object of type str",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-10-7272932f4785>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mbasic\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__module\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m/home/pfernique/Desktop/AutoWIG/doc/examples/basic/src/py/basic/__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0m__module\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mBinomialDistribution\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mOverload\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m: No registered converter was able to produce a C++ rvalue of type std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > from this Python object of type str"
]
}
],
"outputs": [],
"source": [
"import basic.__module"
"import basic\n",
"binomial = basic.BinomialDistribution(1, .5)"
]
},
{
Expand All @@ -226,18 +181,29 @@
},
"outputs": [],
"source": [
"basic.__module.BinomialDistribution()"
"binomial.pmf(0)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": [
"binomial.pmf(1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"asg['class ::BinomialDistribution'].destructor"
"binomial.n = 0"
]
},
{
Expand All @@ -247,7 +213,20 @@
"collapsed": true
},
"outputs": [],
"source": []
"source": [
"binomial.pmf(0)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"binomial.set_pi(1.1)"
]
}
],
"metadata": {
Expand Down

0 comments on commit ebdd8d5

Please sign in to comment.