Re: [Numpy-discussion] Building NumPy on Mac OS X without Apple GCC
> > > Thanks for the reply. Well, I built my Python stuff, including NumPy > > previously, before I changed to the higher GCC version. Do you know if > > there's an option I can toggle that will specify Apple's GCC to be > > used? > > $ CC=/usr/bin/gcc python setup.py build > > -- > > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless enigma > that is made terrible by our own mad attempt to interpret it as though it had > an underlying truth." > -- Umberto Eco > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > Thanks, it worked perfectly. I'd hate to be a little off topic in the NumPy discussion and bug you, but when I try to compile the latest scipy, I get: g++: unrecognized option '-no-cpp-precomp' cc1plus: error: unrecognized command line option "-arch" cc1plus: error: unrecognized command line option "-arch" cc1plus: error: unrecognized command line option "-Wno-long-double" g++: unrecognized option '-no-cpp-precomp' cc1plus: error: unrecognized command line option "-arch" cc1plus: error: unrecognized command line option "-arch" cc1plus: error: unrecognized command line option "-Wno-long-double" And I assume from the way it looks that it's due to a similar reason as my previous compiling problem. I tried adding in CCplus=/usr/bin/g++ but it doesn't seem to do the trick. Again, sorry to keep bugging on an issue I created in my compiling environment, but is there something different I should be typing? ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] documentation generator based on pyparsing
Hi Nils, Nils Wagner wrote: > The output of > > ./gendocs.py -m 'scipy.linsolve.umfpack' > > differs from your example output (available at > http://scipy.org/Generate_Documentation) I had to update the umfpack info.py file (where the module docstring is) to conform the documentation standards. The gendocs.py relies on that, so use, please, the newest SVN version of scipy - it should work with rev. 3601 and later. r. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Building NumPy on Mac OS X without Apple GCC
Joshua Lippai wrote: > > Thanks, it worked perfectly. I'd hate to be a little off topic in the > NumPy discussion and bug you, but when I try to compile the latest > scipy, I get: > > g++: unrecognized option '-no-cpp-precomp' > cc1plus: error: unrecognized command line option "-arch" > cc1plus: error: unrecognized command line option "-arch" > cc1plus: error: unrecognized command line option "-Wno-long-double" > g++: unrecognized option '-no-cpp-precomp' > cc1plus: error: unrecognized command line option "-arch" > cc1plus: error: unrecognized command line option "-arch" > cc1plus: error: unrecognized command line option "-Wno-long-double" > > And I assume from the way it looks that it's due to a similar reason > as my previous compiling problem. I tried adding in > CCplus=/usr/bin/g++ but it doesn't seem to do the trick. Again, sorry > to keep bugging on an issue I created in my compiling environment, but > is there something different I should be typing? > The usual makefile variable for c++ makefiles is CXX, not CCplus, so I would suggest trying that first. David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Building NumPy on Mac OS X without Apple GCC
> Joshua Lippai wrote: > > > > Thanks, it worked perfectly. I'd hate to be a little off topic in the > > NumPy discussion and bug you, but when I try to compile the latest > > scipy, I get: > > > > g++: unrecognized option '-no-cpp-precomp' > > cc1plus: error: unrecognized command line option "-arch" > > cc1plus: error: unrecognized command line option "-arch" > > cc1plus: error: unrecognized command line option "-Wno-long-double" > > g++: unrecognized option '-no-cpp-precomp' > > cc1plus: error: unrecognized command line option "-arch" > > cc1plus: error: unrecognized command line option "-arch" > > cc1plus: error: unrecognized command line option "-Wno-long-double" > > > > And I assume from the way it looks that it's due to a similar reason > > as my previous compiling problem. I tried adding in > > CCplus=/usr/bin/g++ but it doesn't seem to do the trick. Again, sorry > > to keep bugging on an issue I created in my compiling environment, but > > is there something different I should be typing? > > > The usual makefile variable for c++ makefiles is CXX, not CCplus, so I > would suggest trying that first. > > David > > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > Thanks, that did it. Everything's building correctly again. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] How to remove loops over inner()
> Essentially, you want to operate on a stack of two dimensional arrays, > correct? Yes, this is correct -- and I also think that one should be able to provide a list of axes to be ignored. > I'd be mildly supportive of something like this for tensordot; I'd prefer > more descriptive name for keep_axis, but I don't know what it would be off > the top of my head. In any event it should be XXX_axes and optionally take a > sequence of axes so that more than one can be ignored. You could trivially > build more specific functions on top of tensordot, so I don't see that inner > needs to be changed as it's basically a convenience function anyway. Good point; indeed a generalization of |tensordot()| would be sufficient for me! I don't know the best naming here, |ignore_axes| might be a bit more descriptive. Would this feature only require a few lines of code? Would this be easy to implement for an expert on the intricacies of the numpy internals? Best, Hansres ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] scipy binary for macosx tiger on ppc
Hi guys, does anyone of you happen to have sitting somewhere a DMG of a recent version of SciPy compiled for MacOSX 10.4? The SciPy webpage does not carry official releases and it is sending me to the Scipy Superpack by Chris Fonnesbeck but that superpack seems to be for intel cpu only. I didn't think making SciPy working in mac would have been such a pain in the bum. Linux and Win worked without problem but mac is driving me crazy (yes, compiling is a problem too.) Thanks! -- [EMAIL PROTECTED] http://www.cafelamarck.it ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] display numpy array as image
Hello all, I'm curious if people have experience with / preferences for how to display a numpy array onscreen as an image. Pyglet looks relatively easy -- you can feed an image buffer object with a string or a ctypes pointer. I presume getting a string from an array is plenty fast, but the ctypes pointer option is intriguing as it allows for dealing with simple strided arrays (the image objects allow for an arbitrary number of bytes between rows). Is it possible to get a ctypes pointer to the beginning of the array buffer from numpy without too much ugliness? wxPython looks pretty easy too, as there are facilities for getting pixels from a buffer. Does anyone have any experience with these? Are there ways of allowing a numpy array and a wxPython image to point to the same memory? Anyhow, these are specific questions, but I'd also appreciate any general thoughts about good approaches for getting pixels from numpy arrays onscreen. Thanks, Zach ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] display numpy array as image
I am not sure I got what you mean but I am using PIL to convert arrays to images and viceversa see http://mail.python.org/pipermail/image-sig/2006-September/004099.html I embed bmps using wxpython. Zachary Pincus wrote: > Hello all, > > I'm curious if people have experience with / preferences for how to > display a numpy array onscreen as an image. > > Pyglet looks relatively easy -- you can feed an image buffer object > with a string or a ctypes pointer. I presume getting a string from an > array is plenty fast, but the ctypes pointer option is intriguing as > it allows for dealing with simple strided arrays (the image objects > allow for an arbitrary number of bytes between rows). Is it possible > to get a ctypes pointer to the beginning of the array buffer from > numpy without too much ugliness? > > wxPython looks pretty easy too, as there are facilities for getting > pixels from a buffer. Does anyone have any experience with these? Are > there ways of allowing a numpy array and a wxPython image to point to > the same memory? > > Anyhow, these are specific questions, but I'd also appreciate any > general thoughts about good approaches for getting pixels from numpy > arrays onscreen. > > Thanks, > > Zach > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- [EMAIL PROTECTED] http://www.cafelamarck.it ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] scipy binary for macosx tiger on ppc
It's actually pretty simple to compile it yourself once you've installed the latest Xcode from http://developer.apple.com and X11 from the OS X Tiger install disc. The instructions on Scipy's official OS X installation page ( http://scipy.org/Installing_SciPy/Mac_OS_X ) are great for that. That said, it is true that the Scipy Superpack is now Intel-only. You should probably email the guy and ask him to make older versions of the superpack available, or at least the last PPC one he made. Best of luck. Josh On Nov 29, 2007 1:54 PM, Giorgio F. Gilestro <[EMAIL PROTECTED]> wrote: > Hi guys, > does anyone of you happen to have sitting somewhere a DMG of a recent > version of SciPy compiled for MacOSX 10.4? > The SciPy webpage does not carry official releases and it is sending me > to the Scipy Superpack by Chris Fonnesbeck but that superpack seems to > be for intel cpu only. I didn't think making SciPy working in mac would > have been such a pain in the bum. Linux and Win worked without problem > but mac is driving me crazy (yes, compiling is a problem too.) > Thanks! > > > -- > [EMAIL PROTECTED] > http://www.cafelamarck.it > > > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] display numpy array as image
On 30/11/2007, Zachary Pincus <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm curious if people have experience with / preferences for how to > display a numpy array onscreen as an image. I'm not sure if you're after anything specific, but a very convenient way to show 2-D arrays on screen is matplotlib (mpl), which is the recommended graphical interface to numpy. With the pylab interface to mpl, the command is as simple as >>>pylab.imshow(arr) or >>>pylab.matshow(arr) for slightly different axis behaviour. Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] display numpy array as image
On Nov 29, 2007 2:32 PM, Zachary Pincus <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm curious if people have experience with / preferences for how to > display a numpy array onscreen as an image. > > Pyglet looks relatively easy -- you can feed an image buffer object > with a string or a ctypes pointer. I presume getting a string from an > array is plenty fast, but the ctypes pointer option is intriguing as > it allows for dealing with simple strided arrays (the image objects > allow for an arbitrary number of bytes between rows). Is it possible > to get a ctypes pointer to the beginning of the array buffer from > numpy without too much ugliness? > > wxPython looks pretty easy too, as there are facilities for getting > pixels from a buffer. Does anyone have any experience with these? Are > there ways of allowing a numpy array and a wxPython image to point to > the same memory? > > Anyhow, these are specific questions, but I'd also appreciate any > general thoughts about good approaches for getting pixels from numpy > arrays onscreen. > > Thanks, > > Zach > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > Have you tried the matplotlib/pylab module? It has pretty simple ways of doing what you're thinking of if I'm understanding your intent correctly.. Josh ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] display numpy array as image
Zachary Pincus wrote: wxPython looks pretty easy too, as there are facilities for getting pixels from a buffer. Does anyone have any experience with these? some. Are there ways of allowing a numpy array and a wxPython image to point to the same memory? yup. You can build a wxImage from a buffer, and numpy provides a buffer interface, so they end up with them sharing the same memory, as long as your numpy array is contiguous 24 rgb. I've enclosed a sample that generates a wx.Image from a numpy array, then every time you push the button, the array is altered in-place, and you can see the image change. ( think you need at least wxPython 2.8 for this to work) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] #!/usr/bin/env python2.5 """ a small test of initializing a wxImage from a numpy array """ import wx import numpy as N import numpy.random as rand class ImagePanel(wx.Panel): """ A very simple panel for displaying a wx.Image """ def __init__(self, image, *args, **kwargs): wx.Panel.__init__(self, *args, **kwargs) self.image = image self.Bind(wx.EVT_PAINT, self.OnPaint) def OnPaint(self, event): dc = wx.PaintDC(self) dc.DrawBitmap(wx.BitmapFromImage(self.image), 0, 0) class DemoFrame(wx.Frame): """ This window displays a button """ def __init__(self, title = "Micro App"): wx.Frame.__init__(self, None , -1, title) MenuBar = wx.MenuBar() FileMenu = wx.Menu() item = FileMenu.Append(wx.ID_ANY, text = "&Open") self.Bind(wx.EVT_MENU, self.OnOpen, item) item = FileMenu.Append(wx.ID_PREFERENCES, text = "&Preferences") self.Bind(wx.EVT_MENU, self.OnPrefs, item) item = FileMenu.Append(wx.ID_EXIT, text = "&Exit") self.Bind(wx.EVT_MENU, self.OnQuit, item) MenuBar.Append(FileMenu, "&File") HelpMenu = wx.Menu() item = HelpMenu.Append(wx.ID_HELP, "Test &Help", "Help for this simple test") self.Bind(wx.EVT_MENU, self.OnHelp, item) ## this gets put in the App menu on OS-X item = HelpMenu.Append(wx.ID_ABOUT, "&About", "More information About this program") self.Bind(wx.EVT_MENU, self.OnAbout, item) MenuBar.Append(HelpMenu, "&Help") self.SetMenuBar(MenuBar) btn = wx.Button(self, label = "NewImage") btn.Bind(wx.EVT_BUTTON, self.OnNewImage ) self.Bind(wx.EVT_CLOSE, self.OnQuit) ##Create numpy array, and image from it w = h = 200 self.array = rand.randint(0, 255, (3, w, h)).astype('uint8') print self.array image = wx.ImageFromBuffer(w, h, self.array) #image = wx.Image("Images/cute_close_up.jpg") self.Panel = ImagePanel(image, self) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(btn, 0, wx.ALIGN_CENTER|wx.ALL, 5) sizer.Add(self.Panel, 1, wx.GROW) self.SetSizer(sizer) def OnNewImage(self, event=None): """ create a new image by changing underlying numpy array """ self.array *= 1.2 self.Panel.Refresh() def OnQuit(self,Event): self.Destroy() def OnAbout(self, event): dlg = wx.MessageDialog(self, "This is a small program to test\n" "the use of menus on Mac, etc.\n", "About Me", wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def OnHelp(self, event): dlg = wx.MessageDialog(self, "This would be help\n" "If there was any\n", "Test Help", wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def OnOpen(self, event): dlg = wx.MessageDialog(self, "This would be an open Dialog\n" "If there was anything to open\n", "Open File", wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def OnPrefs(self, event): dlg = wx.MessageDialog(self, "This would be an preferences Dialog\n" "If there were any preferences to set.\n", "Preferences", wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy() app = wx.App(False) frame = DemoFrame() frame.Show() app.MainLoop() ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] scipy binary for macosx tiger on ppc
Joshua Lippai wrote: > You should probably email the guy and ask him to make > older versions of the superpack available, or at least the last PPC > one he made. Best of luck. Even better would be Universal (fat) binaries -- I'm pretty sure this is now possible, but haven't figured it out myself yet. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] scipy binary for macosx tiger on ppc
On Nov 29, 2007 3:21 PM, Christopher Barker <[EMAIL PROTECTED]> wrote: > Joshua Lippai wrote: > > You should probably email the guy and ask him to make > > older versions of the superpack available, or at least the last PPC > > one he made. Best of luck. > > Even better would be Universal (fat) binaries -- I'm pretty sure this is > now possible, but haven't figured it out myself yet. > > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R(206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > [EMAIL PROTECTED] > > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > Chris Fonnesbeck used to distribute both PowerPC and Intel binaries, but he can't compile them for PowerPC at all anymore because he no longer has access to a PowerPC machine. That's why now the site's manager is only distributing Intel binaries; Universal builds won't be possible for anything he does from the present time forward. Someone else would have to compile on the PPC side for him. Josh ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] scipy binary for macosx tiger on ppc
Hi Josh, you're right I should probably email the guy directly. I eventually managed to compile it installing the latest xcode, the latest cctool to fix the __dso_handle bug, the gfortran and a couple of other things. It took me an entire afternoon and now I don't have errors on the the scipy.test (but I still have failures :( ) Now I just have to figure out why mac version of matplotlib does not seem to have matplotlib.dates and where did drange go! Thanks Joshua Lippai wrote: > It's actually pretty simple to compile it yourself once you've > installed the latest Xcode from http://developer.apple.com and X11 > from the OS X Tiger install disc. The instructions on Scipy's official > OS X installation page ( http://scipy.org/Installing_SciPy/Mac_OS_X ) > are great for that. That said, it is true that the Scipy Superpack is > now Intel-only. You should probably email the guy and ask him to make > older versions of the superpack available, or at least the last PPC > one he made. Best of luck. > > Josh > > On Nov 29, 2007 1:54 PM, Giorgio F. Gilestro <[EMAIL PROTECTED]> wrote: > >> Hi guys, >> does anyone of you happen to have sitting somewhere a DMG of a recent >> version of SciPy compiled for MacOSX 10.4? >> The SciPy webpage does not carry official releases and it is sending me >> to the Scipy Superpack by Chris Fonnesbeck but that superpack seems to >> be for intel cpu only. I didn't think making SciPy working in mac would >> have been such a pain in the bum. Linux and Win worked without problem >> but mac is driving me crazy (yes, compiling is a problem too.) >> Thanks! >> >> >> -- >> [EMAIL PROTECTED] >> http://www.cafelamarck.it >> >> >> ___ >> Numpy-discussion mailing list >> Numpy-discussion@scipy.org >> http://projects.scipy.org/mailman/listinfo/numpy-discussion >> >> > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- [EMAIL PROTECTED] http://www.cafelamarck.it ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] display numpy array as image
Zachary Pincus wrote: > Hello all, > > I'm curious if people have experience with / preferences for how to > display a numpy array onscreen as an image. > > Pyglet looks relatively easy -- you can feed an image buffer object > with a string or a ctypes pointer. I presume getting a string from an > array is plenty fast, but the ctypes pointer option is intriguing as > it allows for dealing with simple strided arrays (the image objects > allow for an arbitrary number of bytes between rows). Is it possible > to get a ctypes pointer to the beginning of the array buffer from > numpy without too much ugliness? In [16]: from numpy import * In [17]: a = arange(10) In [18]: dir(a.ctypes) Out[18]: ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', '_arr', '_as_parameter_', '_ctypes', '_data', '_zerod', 'data', 'data_as', 'get_as_parameter', 'get_data', 'get_shape', 'get_strides', 'shape', 'shape_as', 'strides', 'strides_as'] In [22]: import ctypes In [24]: a.ctypes.data_as(ctypes.POINTER(ctypes.c_long)) Out[24]: In [25]: a.ctypes.get_shape() Out[25]: In [26]: a.ctypes.get_strides() Out[26]: In [27]: a.ctypes.get_as_parameter() Out[27]: c_void_p(27442576) You might want to use the new ctypes-based OpenGL 3.0+ package. It has numpy support a bit more directly. You can use Pyglet for its windowing and all of the other surrounding infrastructure and use OpenGL directly for the drawing. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] scipy binary for macosx tiger on ppc
Joshua Lippai wrote: > Chris Fonnesbeck used to distribute both PowerPC and Intel binaries, > but he can't compile them for PowerPC at all anymore because he no > longer has access to a PowerPC machine. You can build fat binaries with a single machine -- either one. Whether Chris wants to spend his time figuring all that out is up to him, but it's not a hardware limitation. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] scipy binary for macosx tiger on ppc
Using the gfortran from http://r.research.att.com/tools/, it's trivial to build a universal build from source. The instructions on scipy.org won't lead you astray. I will ask around at work. Perhaps we can start building universal scipy builds for distribution. Can anyone from the scipy devs email me off list if you'd like to pursue this?... triggering a build automatically from SVN commits or such would be good. Barry On Nov 29, 2007 3:43 PM, Christopher Barker <[EMAIL PROTECTED]> wrote: > Joshua Lippai wrote: > > Chris Fonnesbeck used to distribute both PowerPC and Intel binaries, > > but he can't compile them for PowerPC at all anymore because he no > > longer has access to a PowerPC machine. > > You can build fat binaries with a single machine -- either one. Whether > Chris wants to spend his time figuring all that out is up to him, but > it's not a hardware limitation. > > > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R(206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > [EMAIL PROTECTED] > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] scipy binary for macosx tiger on ppc
Barry Wark wrote: > Using the gfortran from http://r.research.att.com/tools/, it's trivial > to build a universal build from source. The instructions on scipy.org > won't lead you astray. > > I will ask around at work. Perhaps we can start building universal > scipy builds for distribution. Can anyone from the scipy devs email me > off list if you'd like to pursue this?... triggering a build > automatically from SVN commits or such would be good. That would be cool, but where to compile the binary ? scipy does not have build farm. Having a 100 % automatic way to build a binary would certainly be a step in this direction, though. There is also the need to test the compiled binary, which is not trivial with fat binaries. To sum up: - we need at least one x86 mac os X machine to build/test (I don't know if you can test python softwares through rosetta: I have only experience testing pure C softwares built as fat binaries) - we need a way to automate the build entirely - we need a way to automate the packaging (distutils can do only part of it or all of it ? Building a basic .pkg inside a dmg is not hard from the command line, but I don't know how it scales for non trivial packages). cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] display numpy array as image
Thanks for the suggestions, everyone! All very informative and most helpful. For what it's worth, here's my application: I'm building a tool for image processing which needs some manual input in a few places (e.g. user draws a few lines). The images are greyscale images with 12-14 bits of dynamic range (from a microscope), so I need to have some basic brightness/contrast/gamma controls, as well as allowing basic drawing on the image to get the needed user input. It looks like GL or wx will be best suited here, I think? (I presume that python/numpy/ [GL|wx] can keep up with things like dragging a slider to change brightness/contrast/other LUT changes, as long as I code reasonably.) Anyhow, thanks for all the input, Zach On Nov 29, 2007, at 9:03 PM, Joe Harrington wrote: > If you want to explore the array interactively, blink images, mess > with > colormaps using the mouse, rescale the image values, mark regions, add > labels, look at dynamic plots of rows and columns, etc., get the ds9 > image viewer and the xpa programs that come with it that allow it to > communicate with other programs: > > ftp://sao-ftp.harvard.edu/pub/rd/ds9 > http://hea-www.harvard.edu/RD/ds9/index.html > > Then get the Python numdisplay package, which uses xpa. You have > to get > numdisplay from inside the stsci_python package: > > http://www.stsci.edu/resources/software_hardware/pyraf/stsci_python/ > current/download > > Just grab the numdisplay directory from within that. Older > versions of > numdisplay are standalone but don't work perfectly. Beware, there are > outdated web sites about numdisplay on the stsci site. Don't google! > > Run ds9 before you load numdisplay. Then you can send your python > arrays to a real interactive data viewer at will. There are even > mechanisms to define physical coordinates mapped from the image > coordinates. > > --jh-- > > ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] swig numpy2carray converters
I have just committed the latest version of numpy.i (a swig interface file for bridging between C arrays and numerical python) to the numpy svn repository. There are three relatively new features that are now supported: * It is now possible to wrap functions that expect integer arguments and have swig generate wrappers that allow you to provide numpy array scalars. * A new ARGOUTVIEW suite of typemaps is provided that allows your wrapped function to provide a pointer to internal data and that returns a numpy array encapsulating it. This is potentially dangerous, but necessary in some situations for very large data buffers. * New typemaps are provided that correctly handle FORTRAN ordered 2D and 3D arrays. Tests for the ARGOUTVIEW and FORTRAN ordered arrays have also been added, and the documentation (doc/numpy_swig.*) has been updated to reflect all of these changes. On Nov 26, 2007, at 3:52 PM, Christopher Barker wrote: > Bill Spotz wrote: >> First, my plan is to add to numpy.i, typemaps for signatures like the >> following: >> >> %typemap(argout) (double** ARGOUT_ARRAY1, int* DIM1) >> >> It is important to note that even though the same argument *names* >> are used, this is a different typemap signature than >> >> %typemap(argout) (double* ARGOUT_ARRAY1, int DIM1) >> >> and thus can have (logically) different implementations. > > maybe it's a good idea to give the arguments different names, though, > just for clarity. > >> As for having a COPY version of the first typemap signature (in >> addition to the non-copy, or "view" version), I currently do not plan >> to do this. > > I think you've got it right. > > Thanks for all this! > > -Chris > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R(206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > [EMAIL PROTECTED] > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: [EMAIL PROTECTED] ** ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] display numpy array as image
If you want to explore the array interactively, blink images, mess with colormaps using the mouse, rescale the image values, mark regions, add labels, look at dynamic plots of rows and columns, etc., get the ds9 image viewer and the xpa programs that come with it that allow it to communicate with other programs: ftp://sao-ftp.harvard.edu/pub/rd/ds9 http://hea-www.harvard.edu/RD/ds9/index.html Then get the Python numdisplay package, which uses xpa. You have to get numdisplay from inside the stsci_python package: http://www.stsci.edu/resources/software_hardware/pyraf/stsci_python/current/download Just grab the numdisplay directory from within that. Older versions of numdisplay are standalone but don't work perfectly. Beware, there are outdated web sites about numdisplay on the stsci site. Don't google! Run ds9 before you load numdisplay. Then you can send your python arrays to a real interactive data viewer at will. There are even mechanisms to define physical coordinates mapped from the image coordinates. --jh-- ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] documentation generator based on pyparsing
On Thu, 29 Nov 2007 10:01:26 +0100 Robert Cimrman <[EMAIL PROTECTED]> wrote: > Hi Nils, > > Nils Wagner wrote: >> The output of >> >> ./gendocs.py -m 'scipy.linsolve.umfpack' >> >> differs from your example output (available at >> http://scipy.org/Generate_Documentation) > > I had to update the umfpack info.py file (where the >module docstring is) > to conform the documentation standards. The gendocs.py >relies on that, > so use, please, the newest SVN version of scipy - it >should work with > rev. 3601 and later. Hi Robert, Thank you for your note. It works fine for me with python2.5. However python2.3 results in ./gendocs.py -m 'scipy.linsolve.umfpack' Traceback (most recent call last): File "./gendocs.py", line 261, in ? main() File "./gendocs.py", line 207, in main default = 1, help = help['page'] ) File "/usr/lib64/python2.3/optparse.py", line 820, in add_option option = self.option_class(*args, **kwargs) File "/usr/lib64/python2.3/optparse.py", line 430, in __init__ checker(self) File "/usr/lib64/python2.3/optparse.py", line 499, in _check_type raise OptionError("invalid option type: %r" % self.type, self) optparse.OptionError: option -p/--page: invalid option type: How can I resolve this problem ? Nils ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion