[nengo-user] integrating Nengo with IPython
Trevor Bekolay
tbekolay at gmail.com
Fri Oct 3 13:07:44 EDT 2014
Hi Mehdi,
Unfortunately those instructions were for a version of the IPython notebook
which is at this point pretty old. IPython is easier to plug into now, so
it should be possible to update these instructions; but, the new version of
Nengo is implemented in Python, which works well with IPython out of the
box, so we haven't gone back and updated these instructions recently.
My suggestion for now is to just do what the javascript changes would have
done manually. So, somewhere at the top of your notebook, do
from stats.ipython import run_in_nengo
and then when you want to run a Nengo 1.4 script, do:
run_in_nengo(''' # Replace below with your Nengo script
import nef
net=nef.Network('Test')
net.make('A',50,1)
net.make_input('input',{0: -1, 0.2: -0.5, 0.4:0, 0.6:0.5, 0.8:1.0})
net.connect('input','A')
log=net.log()
log.add('input',tau=0)
log.add('A')
net.run(1.0)
''')
The rest of that document should work from that point onwards.
Sorry about the Nengo 1.4 rough edges! We're hoping to get Nengo 2 out the
door soon, which should be much easier to interact with in the notebook!
- Trevor
On Wed, Oct 1, 2014 at 4:18 PM, mehdi daemi <daemi at yorku.ca> wrote:
> Hi,
>
> I was using the link "*http://www.nengo.ca/docs/html/advanced/ipython_notebook.html
> <http://www.nengo.ca/docs/html/advanced/ipython_notebook.html>" *for
> integrating Nengo wtih IPython.
> In the third section called "Telling IPython to use Nengo", I can't find
> the directory "*IPython/frontend/html/notebook/static/js*". I find the
> file *notebook.js* in directory "*IPython\html\static\notebook\js*", but
> I can't find the code which should be changed in this file. Can you please
> help me with this?
>
> Thanks,
> --
> Mehdi Daemi
>
> PhD Student in Biology
> Crawford Visuomotor Neuroscience Lab
> Centre for Vision Research
> York University, 4700 Keele Street, Toronto, Ontario, Canada, M3J 1P3
> Email: daemi at yorku.ca
>
> _______________________________________________
> nengo-user mailing list
> nengo-user at ctnsrv.uwaterloo.ca
> http://ctnsrv.uwaterloo.ca/mailman/listinfo/nengo-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://artsservices.uwaterloo.ca/pipermail/nengo-user/attachments/20141003/7d482e74/attachment-0002.html>
More information about the nengo-user
mailing list