Re: [Matplotlib-users] ImportError: No module named _winreg
Those look like they are coming up out of numpy. I am not familiar with gentoo, but it looks like numpy is not in the dependencies list. Tom On Mon, Apr 27, 2015, 16:59 Martin MOKREJŠ wrote: > Hi, >I use dev-python/matplotlib-1.4.3 and I suspect this is a recent > regression in it. Can anybody reproduce this? > > $ pychecker test.py > Processing module test (test.py)... > warning: couldn't find real module for class > (module name: fftpack) > warning: couldn't find real module for class 'lapack_lite.LapackError'> (module name: lapack_lite) > warning: couldn't find real module for class > (module name: mtrand) > warning: couldn't find real module for class > (module name: mtrand) >ImportError: No module named _winreg > warning: couldn't find real module for class (module > name: cntr) > > Warnings... > > test.py:3: Imported module (pylab) not used > $ cat test.py > #! /usr/bin/python > > import pylab > $ > > > > > > > It was installed with these flags on Gentoo Linux: > > # emerge -pv matplotlib > > These are the packages that would be merged, in order: > > Calculating dependencies... done! > [ebuild R] dev-python/matplotlib-1.4.3::gentoo USE="cairo examples > fltk gtk tk wxwidgets -doc -excel -gtk3 -latex -pyside -qt4 -qt5 {-test}" > PYTHON_TARGETS="python2_7 -python3_3 -python3_4" 0 KiB > > > > I use dev-python/pychecker-0.8.19-r1 for the code sanity checks. > http://pychecker.sourceforge.net/ http://pypi.python.org/pypi/PyChecker > > > Thank you for clues, > Martin > > > -- > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] ImportError: No module named _winreg
Hi, I use dev-python/matplotlib-1.4.3 and I suspect this is a recent regression in it. Can anybody reproduce this? $ pychecker test.py Processing module test (test.py)... warning: couldn't find real module for class (module name: fftpack) warning: couldn't find real module for class (module name: lapack_lite) warning: couldn't find real module for class (module name: mtrand) warning: couldn't find real module for class (module name: mtrand) ImportError: No module named _winreg warning: couldn't find real module for class (module name: cntr) Warnings... test.py:3: Imported module (pylab) not used $ cat test.py #! /usr/bin/python import pylab $ It was installed with these flags on Gentoo Linux: # emerge -pv matplotlib These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R] dev-python/matplotlib-1.4.3::gentoo USE="cairo examples fltk gtk tk wxwidgets -doc -excel -gtk3 -latex -pyside -qt4 -qt5 {-test}" PYTHON_TARGETS="python2_7 -python3_3 -python3_4" 0 KiB I use dev-python/pychecker-0.8.19-r1 for the code sanity checks. http://pychecker.sourceforge.net/ http://pypi.python.org/pypi/PyChecker Thank you for clues, Martin -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Wind barb bug
Hi Tom, Thanks for the reply. I will open it as an issue on github. Best regards, Jesper 2015-04-25 22:20 GMT+02:00 Thomas Caswell : > Jesper, > > Can you open an issue on this on github. If you are feeling ambitious a > pull request fixing the bug (as you seem to have a good idea of where the > problem is) would also be great! > > Tom > > On Fri, Apr 24, 2015 at 8:38 AM Jesper Larsen > wrote: > >> Hi Matplotlib Users, >> >> When I make wind barbs with rounding enabled and custom barb increments I >> noticed that there were no wind barbs with half barbs above 2 full barbs. >> The reason seems to be a bug in the _find_tails method. The bug is >> illustrated by this small script (_find_tails is a copy of the one in >> matplotlib): >> >> import numpy as np >> >> def _find_tails(self, mag, rounding=True, half=5, full=10, flag=50): >> ''' >> Find how many of each of the tail pieces is necessary. Flag >> specifies the increment for a flag, barb for a full barb, and half for >> half a barb. Mag should be the magnitude of a vector (ie. >= 0). >> >> This returns a tuple of: >> >> (*number of flags*, *number of barbs*, *half_flag*, *empty_flag*) >> >> *half_flag* is a boolean whether half of a barb is needed, >> since there should only ever be one half on a given >> barb. *empty_flag* flag is an array of flags to easily tell if >> a barb is empty (too low to plot any barbs/flags. >> ''' >> >> #If rounding, round to the nearest multiple of half, the smallest >> #increment >> if rounding: >> mag = half * (mag / half + 0.5).astype(np.int) >> >> num_flags = np.floor(mag / flag).astype(np.int) >> mag = np.mod(mag, flag) >> >> num_barb = np.floor(mag / full).astype(np.int) >> mag = np.mod(mag, full) >> >> half_flag = mag >= half >> empty_flag = ~(half_flag | (num_flags > 0) | (num_barb > 0)) >> >> return num_flags, num_barb, half_flag, empty_flag >> >> def main(): >> mag = np.arange(0,21,1) >> barb_incs = {'half': 2.57222, >> 'full': 5.1, >> 'flag': 25.7222} >> print 'With rounding' >> num_flags, num_barb, half_flag, empty_flag = _find_tails(None, mag, >> rounding=True, **barb_incs) >> for i in range(len(mag)): >> print mag[i], num_flags[i], num_barb[i], half_flag[i], >> empty_flag[i] >> print 'Without rounding' >> num_flags, num_barb, half_flag, empty_flag = _find_tails(None, mag, >> rounding=False, **barb_incs) >> for i in range(len(mag)): >> print mag[i], num_flags[i], num_barb[i], half_flag[i], >> empty_flag[i] >> >> if __name__ == '__main__': >> exit(main()) >> >> It seems like the error is not present when the barb increments are not >> set. I believe the reason for the bug is the float comparison (half_flag = >> mag >= half) where the value is rounded to a value very close to/identical >> to the 'half' increment. And it seems like python does the right thing when >> the "half" increment is a whole number but not always when it is not. >> >> But in any case the code should probably not depend two floats being >> equal. >> >> Best regards, >> Jesper >> >> -- >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> ___ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users