Re: [Numpy-discussion] collecting the bluest pixels

2008-10-07 Thread Anne Archibald
2008/10/7 Christopher Barker <[EMAIL PROTECTED]>: > I wonder if the euclidian norm would make sense for this application: > > HowFarFromBlue = np.sqrt((255-image[...,BLU])**2 + > image[...,GRN]**2 + > image[...,RED]**2) > > smaller numbers would be

Re: [Numpy-discussion] ImportError: No module named ma

2008-10-07 Thread John Harrold
Sometime in October, Christopher Barker proposed the following: | the installation package for OS-X is for the python.org build -- from | the above, I can see you are running Apple's python, which came with a | version of numpy. | | I don't remember how you installed matplotlib, but in general

Re: [Numpy-discussion] Merge of generalised ufuncs branch

2008-10-07 Thread Charles R Harris
On Tue, Oct 7, 2008 at 2:52 PM, Charles R Harris <[EMAIL PROTECTED]>wrote: > > > On Tue, Oct 7, 2008 at 1:42 PM, Stéfan van der Walt <[EMAIL PROTECTED]>wrote: > >> Hi all, >> >> The generalised ufuncs branch was made available before SciPy'08. We >> solicited comments on its implementation and st

Re: [Numpy-discussion] collecting the bluest pixels

2008-10-07 Thread Christopher Barker
paul taney wrote: > Thank you Stefan and Anne for such quick replies. > > I am writing a gimp plugin cool! > I get a divide by zero error on > > np.divide(image[...,BLU], image[...,GRN], B) > > ...and I dont understand this well enough to diagnose. Any ideas? you're dividing the value o

Re: [Numpy-discussion] Merge of generalised ufuncs branch

2008-10-07 Thread Charles R Harris
On Tue, Oct 7, 2008 at 1:42 PM, Stéfan van der Walt <[EMAIL PROTECTED]>wrote: > Hi all, > > The generalised ufuncs branch was made available before SciPy'08. We > solicited comments on its implementation and structuring, but received > very little feedback. Unless there are any further comments

Re: [Numpy-discussion] collecting the bluest pixels

2008-10-07 Thread paul taney
Thank you Stefan and Anne for such quick replies. I am writing a gimp plugin, and if anybody is interested in how do that -- there are only about 10-20 examples that I"ve found -- this plugin is attempting to do raster-to-vector conversion on the bluest pixels. It outputs SVG and a python tupl

Re: [Numpy-discussion] Merge of generalised ufuncs branch

2008-10-07 Thread Anne Archibald
2008/10/7 Stéfan van der Walt <[EMAIL PROTECTED]>: > The generalised ufuncs branch was made available before SciPy'08. We > solicited comments on its implementation and structuring, but received > very little feedback. Unless there are any further comments from the > community, I propose that we

Re: [Numpy-discussion] ImportError: No module named ma

2008-10-07 Thread Christopher Barker
John Harrold wrote: > This should answer both of your questions: > import numpy print numpy.__version__ > 1.0.1 print numpy.core.ma > '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/ma.pyc'> > > I actually installed 1.2.0 using the installati

Re: [Numpy-discussion] Merge of generalised ufuncs branch

2008-10-07 Thread Jarrod Millman
On Tue, Oct 7, 2008 at 12:42 PM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > The generalised ufuncs branch was made available before SciPy'08. We > solicited comments on its implementation and structuring, but received > very little feedback. Unless there are any further comments from the >

[Numpy-discussion] Merge of generalised ufuncs branch

2008-10-07 Thread Stéfan van der Walt
Hi all, The generalised ufuncs branch was made available before SciPy'08. We solicited comments on its implementation and structuring, but received very little feedback. Unless there are any further comments from the community, I propose that we merge it. It is unfortunate that we have so many

Re: [Numpy-discussion] ImportError: No module named ma

2008-10-07 Thread John Harrold
Sometime in October, St?fan van der Walt proposed the following: | Could you give us the version of NumPy that you are using? | | >>> import numpy | >>> print numpy.__version__ | | As far as I recall, the masked array module was always available as | numpy.ma, but maybe I'm wrong. Could you tr

Re: [Numpy-discussion] ImportError: No module named ma

2008-10-07 Thread Stéfan van der Walt
Hi John 2008/10/7 John Harrold <[EMAIL PROTECTED]>: > I'm trying to run some scripts associated with a paper I was reading. They use > the matplotlib to generate figures which in turn calles numpy. I'm new to > python, but I'm very familiar with perl. I'm getting the following error, and > I'm not

Re: [Numpy-discussion] ImportError: No module named ma

2008-10-07 Thread Pierre GM
On Tuesday 07 October 2008 15:23:58 John Harrold wrote: > "/Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5.egg/matplotlib/c >book.py", line 9, in import numpy.ma as ma > ImportError: No module named ma John, Are you sure you have numpy installed ? What version do you have ? __

Re: [Numpy-discussion] collecting the bluest pixels

2008-10-07 Thread Anne Archibald
2008/10/7 paul taney <[EMAIL PROTECTED]>: > Hi, > > I have this silly color filter that Stefan gave me: > > > def vanderwalt(image, f): >"""colorfilter, thanks to Stefan van der Walt""" >RED, GRN, BLU = 0, 1, 2 >bluemask = (image[...,BLU] > f*image[...,GRN]) & \ > (image[.

Re: [Numpy-discussion] collecting the bluest pixels

2008-10-07 Thread Stéfan van der Walt
Hi Paul 2008/10/7 paul taney <[EMAIL PROTECTED]>: > I have this silly color filter that Stefan gave me: > > def vanderwalt(image, f): >"""colorfilter, thanks to Stefan van der Walt""" >RED, GRN, BLU = 0, 1, 2 >bluemask = (image[...,BLU] > f*image[...,GRN]) & \ > (image[..

[Numpy-discussion] ImportError: No module named ma

2008-10-07 Thread John Harrold
Howdy, I'm trying to run some scripts associated with a paper I was reading. They use the matplotlib to generate figures which in turn calles numpy. I'm new to python, but I'm very familiar with perl. I'm getting the following error, and I'm not quite sure what is causing it. Can anyone here offer

[Numpy-discussion] collecting the bluest pixels

2008-10-07 Thread paul taney
Hi, I have this silly color filter that Stefan gave me: def vanderwalt(image, f): """colorfilter, thanks to Stefan van der Walt""" RED, GRN, BLU = 0, 1, 2 bluemask = (image[...,BLU] > f*image[...,GRN]) & \ (image[...,BLU] > f*image[...,RED]) return bluemask To c

Re: [Numpy-discussion] can't build numpy 1.2.0 under python 2.6 (windows-amd64) using VS9

2008-10-07 Thread Charles R Harris
On Tue, Oct 7, 2008 at 11:42 AM, Paul Lucek <[EMAIL PROTECTED]> wrote: > I get the following errors in umathmodule.c.src: > > > > D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c > /nolog > > o /Ox /MD /W3 /GS- /DNDEBUG -Ibuild\src.win-amd64-2.6\numpy\core\src > -Inumpy\c

[Numpy-discussion] can't build numpy 1.2.0 under python 2.6 (windows-amd64) using VS9

2008-10-07 Thread Paul Lucek
I get the following errors in umathmodule.c.src: D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nolog o /Ox /MD /W3 /GS- /DNDEBUG -Ibuild\src.win-amd64-2.6\numpy\core\src -Inumpy\cor e\include -Ibuild\src.win-amd64-2.6\numpy\core\include/numpy -Inumpy\core\src -I

Re: [Numpy-discussion] Scipy in Python 2.6

2008-10-07 Thread Nadav Horesh
1. The latest release of setuptools solved the problem of scikits 2. Idle error log example: >>> from pylab import * Traceback (most recent call last): File "", line 1, in from pylab import * File "/usr/local/lib/python2.6/site-packages/pylab.py", line 1, in from matplotlib.pylab im