Search found 7 matches

by mbesserve
Wed Mar 28, 2018 1:53 pm
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 12274

Re: Truncation of floats upon loading .hoc file from ipython

I did a reinstall with a brand new conda environment: Here is the full procedure: # create conda environment and activate conda create -n lfpy2 python=2.7 pip ipython source activate lfpy2 # just add this package, as I have see in one post it may be required, other required packages are already inst...
by mbesserve
Wed Mar 28, 2018 11:43 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 12274

Re: Truncation of floats upon loading .hoc file from ipython

Hi Michael, The problem remains after changing the init file as you suggested. Regarding the minimalistic example: neuron.h.load_file('/is/ei/besserve/MBsource/scripts/neural_models/hybridlfpy/morphologies/pc1abis.hoc') neuron.h.dend[0].diam3d(0) now does not work anymore in an ipython console (with...
by mbesserve
Wed Mar 28, 2018 10:46 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 12274

Re: Truncation of floats upon loading .hoc file from ipython

Hi Michael, I do not usually "import hoc", but just tried this do figure out any potential issue. In the end I guess the errors are due to some library file used by the hoc file interpreter (not working properly, absent or conflicting with others libraries in some situations?) when running...
by mbesserve
Tue Mar 27, 2018 6:30 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 12274

Re: Truncation of floats upon loading .hoc file from ipython

@ramcdougal and hines: Thanks for your time and comments! Actually it does also print directly in spyder, when I run from neuron import hoc hoc. execute("1/2") This "normal" procedure imports hoc by finding the neuron library in my python path, and (I guess) running the __init__....
by mbesserve
Thu Mar 22, 2018 7:08 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 12274

Re: Truncation of floats upon loading .hoc file from ipython

A short update. I am yet unable to reproduce the truncation issue with ipython in command line (although i am 100% sure it happened before), but the error still occurs when using spyder (which is using an ipython console too). I checked the library files are the same in both situations: /usr/local/n...
by mbesserve
Thu Mar 22, 2018 3:57 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 12274

Re: Truncation of floats upon loading .hoc file from ipython

My apologies for the lack of precision in the original post. Here is what I do in detail in spyder (ipython console): Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42) Type "copyright", "credits" or "license" for more information. IPython 4.0.3 -- An enhanc...
by mbesserve
Mon Mar 19, 2018 10:19 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 12274

Truncation of floats upon loading .hoc file from ipython

Dear Neuron community, I am reporting here an issue that I have specifically with ipython, while *the same code in python seems to work fine*. I have converted an .swc cell morphology file to a .hoc file using the Neuron GUI (Import 3D _ cell builder). With an ipython console I then load this file i...