[IPython-User] numerical inaccuracy on osx (notebook)

epi massimodisasha@gmail....
Mon Jun 24 14:46:51 CDT 2013


from a notebook session :

numpy.lib

print out :

<module 'numpy.lib' from '/usr/local/lib/python2.7/site-packages/numpy/lib/__init__.pyc'>

from an ipython shell :

In [2]: import numpy as np

In [3]: np.lib
Out[3]: <module 'numpy.lib' from '/usr/local/lib/python2.7/site-packages/numpy/lib/__init__.pyc'>

note :

the notebook doesn't need to import  numpy .. ?!


if i start a new notebook and type :

numpy.version.version

it print out the bumpy version … no needs to import anything ;?
 

Il giorno 24/giu/2013, alle ore 14:13, Thomas Kluyver <takowl@gmail.com> ha scritto:

> Can you see where each is importing numpy from?
> 
> 
> On 24 June 2013 19:09, epi <massimodisasha@gmail.com> wrote:
> Matthias,
> 
> i removed "all" the ipython installation i found on my system (system python, brew python)
> 
> then i reinstalled ipython with pip  (pip install -U ipython)
> 
> which ipython
> /usr/local/share/python/ipython
> 
> ipython --version
> 0.13.2
> 
> 
> testing in the notebook  the lines :
> 
> import numpy as np
> url='http://www.cdc.noaa.gov/Correlation/amon.us.long.data'
> data = np.genfromtxt(url, skip_header=1, skip_footer=4)
> 
> data[:, 1:][0]
> 
> array([ 0.22 ,  0.153,  0.224,  0.143,  0.196,  0.218,  0.232,  0.209,
>         0.276,  0.126,  0.136,  0.23 ])
> 
> from the url :   http://www.cdc.noaa.gov/Correlation/amon.us.long.data
> 
> the first row is :
> 
> 1856    0.220    0.153    0.225    0.144    0.196    0.219    0.232    0.209    0.276    0.126    0.137    0.231
> 
> 
> I think the problem is in the notebook + bumpy/pylab  can be possible ?
> because in the notebook the pandas example work just fine (same results between notebook and shell/qtconsole)
> or something related to my locale / system profiles / ipython config ?
> 
> 
> 
> i tried to open the qtconsole from inside the notebook "  %qtconsole magic "
> and i got the same problem.
> 
> attached a screenshot [1]
> on the left the ipython shell and qt console running from the bash command line
> on the right the notebook and qt console running from the qtconsole magic
> 
> [1] http://geofemengineering.it/logs/test_np.png
> 
> 
> Il giorno 24/giu/2013, alle ore 13:09, Matthias BUSSONNIER <bussonniermatthias@gmail.com> ha scritto:
> 
> >
> > Le 24 juin 2013 à 19:00, epi a écrit :
> >
> >> Hi Matthias,
> >
> > Hi Massimo,
> >
> >>
> >> i do not have EPD/ANACONDA installed.
> >> i'm  running homebrew python with ipython installed from source (GIT master)
> >
> > Does the same happened if you start qtconsole from the notebook with the %qtconsole magic ?
> > I'm really astonished about how qtconsole  and notebook could differ.
> > --
> > Matthias
> >
> > _______________________________________________
> > IPython-User mailing list
> > IPython-User@scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-user
> 
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
> 
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130624/c29f9025/attachment.html 


More information about the IPython-User mailing list