[Numpy-discussion] broadcasting question
I think this should be simple, but I'm drawing a blank I have 2 2d matrixes Matrix A has indexes (i, symbol) Matrix B has indexes (state, symbol) I combined them into a 3d matrix: C = A[:,newaxis,:] + B[newaxis,:,:] where C has indexes (i, state, symbol) That works fine. Now suppose I want to omit B (for debug), like: C = A[:,newaxis,:] In other words, all I want is to add a dimension into A and force it to broadcast along that axis. How do I do that? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] broadcasting question
On Thursday, August 30, 2012, Neal Becker wrote: I think this should be simple, but I'm drawing a blank I have 2 2d matrixes Matrix A has indexes (i, symbol) Matrix B has indexes (state, symbol) I combined them into a 3d matrix: C = A[:,newaxis,:] + B[newaxis,:,:] where C has indexes (i, state, symbol) That works fine. Now suppose I want to omit B (for debug), like: C = A[:,newaxis,:] In other words, all I want is to add a dimension into A and force it to broadcast along that axis. How do I do that? np.tile would help you there, I think. Ben Root ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] broadcasting question
On Thu, Aug 30, 2012 at 12:49 PM, Neal Becker ndbeck...@gmail.com wrote: I think this should be simple, but I'm drawing a blank I have 2 2d matrixes Matrix A has indexes (i, symbol) Matrix B has indexes (state, symbol) I combined them into a 3d matrix: C = A[:,newaxis,:] + B[newaxis,:,:] where C has indexes (i, state, symbol) That works fine. Now suppose I want to omit B (for debug), like: C = A[:,newaxis,:] In other words, all I want is to add a dimension into A and force it to broadcast along that axis. How do I do that? C, dummy = numpy.broadcast_arrays(A[:,newaxis,:], numpy.empty([1,state,1])) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] A sad day for our community. John Hunter: 1968-2012.
Dear friends and colleagues, I am terribly saddened to report that yesterday, August 28 2012 at 10am, John D. Hunter died from complications arising from cancer treatment at the University of Chicago hospital, after a brief but intense battle with this terrible illness. John is survived by his wife Miriam, his three daughters Rahel, Ava and Clara, his sisters Layne and Mary, and his mother Sarah. Note: If you decide not to read any further (I know this is a long message), please go to this page for some important information about how you can thank John for everything he gave in a decade of generous contributions to the Python and scientific communities: http://numfocus.org/johnhunter. Just a few weeks ago, John delivered his keynote address at the SciPy 2012 conference in Austin centered around the evolution of matplotlib: http://www.youtube.com/watch?v=e3lTby5RI54 but tragically, shortly after his return home he was diagnosed with advanced colon cancer. This diagnosis was a terrible discovery to us all, but John took it with his usual combination of calm and resolve, and initiated treatment procedures. Unfortunately, the first round of chemotherapy treatments led to severe complications that sent him to the intensive care unit, and despite the best efforts of the University of Chicago medical center staff, he never fully recovered from these. Yesterday morning, he died peacefully at the hospital with his loved ones at his bedside. John fought with grace and courage, enduring every necessary procedure with a smile on his face and a kind word for all of his caretakers and becoming a loved patient of the many teams that ended up involved with his case. This was no surprise for those of us who knew him, but he clearly left a deep and lasting mark even amongst staff hardened by the rigors of oncology floors and intensive care units. I don't need to explain to this community the impact of John's work, but allow me to briefly recap, in case this is read by some who don't know the whole story. In 2002, John was a postdoc at the University of Chicago hospital working on the analysis of epilepsy seizure data in children. Frustrated with the state of the existing proprietary solutions for this class of problems, he started using Python for his work, back when the scientific Python ecosystem was much, much smaller than it is today and this could have been seen as a crazy risk. Furthermore, he found that there were many half-baked solutions for data visualization in Python at the time, but none that truly met his needs. Undeterred, he went on to create matplotlib (http://matplotlib.org) and thus overcome one of the key obstacles for Python to become the best solution for open source scientific and technical computing. Matplotlib is both an amazing technical achievement and a shining example of open source community building, as John not only created its backbone but also fostered the development of a very strong development team, ensuring that the talent of many others could also contribute to this project. The value and importance of this are now painfully clear: despite having lost John, matplotlib continues to thrive thanks to the leadership of Michael Droetboom, the support of Perry Greenfield at the Hubble Telescope Science Institute, and the daily work of the rest of the team. I want to thank Perry and Michael for putting their resources and talent once more behind matplotlib, securing the future of the project. It is difficult to overstate the value and importance of matplotlib, and therefore of John's contributions (which do not end in matplotlib, by the way; but a biography will have to wait for another day...). Python has become a major force in the technical and scientific computing world, leading the open source offers and challenging expensive proprietary platforms with large teams and millions of dollars of resources behind them. But this would be impossible without a solid data visualization tool that would allow both ad-hoc data exploration and the production of complex, fine-tuned figures for papers, reports or websites. John had the vision to make matplotlib easy to use, but powerful and flexible enough to work in graphical user interfaces and as a server-side library, enabling a myriad use cases beyond his personal needs. This means that now, matplotlib powers everything from plots in dissertations and journal articles to custom data analysis projects and websites. And despite having left his academic career a few years ago for a job in industry, he remained engaged enough that as of today, he is still the top committer to matplotlib; this is the git shortlog of those with more than 1000 commits to the project: 2145 John Hunter jdh2...@gmail.com 2130 Michael Droettboom mdb...@gmail.com 1060 Eric Firing efir...@hawaii.edu All of this was done by a man who had three children to raise and who still always found the time to help those on the mailing lists, solve
Re: [Numpy-discussion] A sad day for our community. John Hunter: 1968-2012.
This is sad news for neuroscience and everyone doing data visualization in Python. Dr. Hunter was not only a well renowned neuroscientist, he also created what I hold to be among the best 2D data visualization tools available. My next neuroscience paper that uses Matplotlib will mention Dr. Hunter in the Acknowledgement. I encourage everyone else who are using Matplotlib for their research to do the same. Sturla Molden Ph.D. On 30.08.2012 04:57, Fernando Perez wrote: Dear friends and colleagues, [please excuse a possible double-post of this message, in-flight internet glitches] I am terribly saddened to report that yesterday, August 28 2012 at 10am, John D. Hunter died from complications arising from cancer treatment at the University of Chicago hospital, after a brief but intense battle with this terrible illness. John is survived by his wife Miriam, his three daughters Rahel, Ava and Clara, his sisters Layne and Mary, and his mother Sarah. Note: If you decide not to read any further (I know this is a long message), please go to this page for some important information about how you can thank John for everything he gave in a decade of generous contributions to the Python and scientific communities: http://numfocus.org/johnhunter. Just a few weeks ago, John delivered his keynote address at the SciPy 2012 conference in Austin centered around the evolution of matplotlib: http://www.youtube.com/watch?v=e3lTby5RI54 but tragically, shortly after his return home he was diagnosed with advanced colon cancer. This diagnosis was a terrible discovery to us all, but John took it with his usual combination of calm and resolve, and initiated treatment procedures. Unfortunately, the first round of chemotherapy treatments led to severe complications that sent him to the intensive care unit, and despite the best efforts of the University of Chicago medical center staff, he never fully recovered from these. Yesterday morning, he died peacefully at the hospital with his loved ones at his bedside. John fought with grace and courage, enduring every necessary procedure with a smile on his face and a kind word for all of his caretakers and becoming a loved patient of the many teams that ended up involved with his case. This was no surprise for those of us who knew him, but he clearly left a deep and lasting mark even amongst staff hardened by the rigors of oncology floors and intensive care units. I don't need to explain to this community the impact of John's work, but allow me to briefly recap, in case this is read by some who don't know the whole story. In 2002, John was a postdoc at the University of Chicago hospital working on the analysis of epilepsy seizure data in children. Frustrated with the state of the existing proprietary solutions for this class of problems, he started using Python for his work, back when the scientific Python ecosystem was much, much smaller than it is today and this could have been seen as a crazy risk. Furthermore, he found that there were many half-baked solutions for data visualization in Python at the time, but none that truly met his needs. Undeterred, he went on to create matplotlib (http://matplotlib.org) and thus overcome one of the key obstacles for Python to become the best solution for open source scientific and technical computing. Matplotlib is both an amazing technical achievement and a shining example of open source community building, as John not only created its backbone but also fostered the development of a very strong development team, ensuring that the talent of many others could also contribute to this project. The value and importance of this are now painfully clear: despite having lost John, matplotlib continues to thrive thanks to the leadership of Michael Droetboom, the support of Perry Greenfield at the Hubble Telescope Science Institute, and the daily work of the rest of the team. I want to thank Perry and Michael for putting their resources and talent once more behind matplotlib, securing the future of the project. It is difficult to overstate the value and importance of matplotlib, and therefore of John's contributions (which do not end in matplotlib, by the way; but a biography will have to wait for another day...). Python has become a major force in the technical and scientific computing world, leading the open source offers and challenging expensive proprietary platforms with large teams and millions of dollars of resources behind them. But this would be impossible without a solid data visualization tool that would allow both ad-hoc data exploration and the production of complex, fine-tuned figures for papers, reports or websites. John had the vision to make matplotlib easy to use, but powerful and flexible enough to work in graphical user interfaces and as a server-side library, enabling a myriad use cases beyond his personal needs. This means that now, matplotlib
[Numpy-discussion] Temporary error accessing NumPy tickets
Hi, When I access tickets, for example: http://projects.scipy.org/numpy/ticket/2185 then sometimes I get: Trac detected an internal error: OperationalError: database is locked For example yesterday. A refresh in about a minute fixed the problem. Today it still lasts at the moment. Ondrej ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] installing numpy in jython (in Netbeans)
On 8/27/2012 9:51 AM, Chris Barker wrote: On Sun, Aug 26, 2012 at 8:53 PM, Todd Brunhoffto...@nvr.com wrote: Chris, winpdb is ok, although it is only a graphic debugger, not an ide, emphasis on the 'd'. yup -- I mentioned, that as you seem to like NB -- and I know I try to use the same editor for eveything. But if you want a nice full-on IDE for Python, there are a lot of them. Im an editor_termal guy, so I can't make a recommendation, but some of the biggies are: Eclipse+PyDev PyCharm WindIDE Spyder (particularly nice for numpy/ matplotlib, etc) I had not considered these yet, but they look interesting. I ended up here: http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#Python which compares IDEs for every language, and found a free python plugin for VS 2010 which looks excellent. I may also try Spyder since I would expect you atmospheric guys would know where numericals are well integrated. Thanks. Todd -Chris ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Debian/Ubuntu patch help (was: ANN: NumPy 1.6.2 release candidate 1)
On Tue, May 15, 2012 at 11:52 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, May 12, 2012 at 9:17 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, May 12, 2012 at 6:22 PM, Sandro Tosi matrixh...@gmail.com wrote: Hello, On Sat, May 5, 2012 at 8:15 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: Hi, I'm pleased to announce the availability of the first release candidate of NumPy 1.6.2. This is a maintenance release. Due to the delay of the NumPy 1.7.0, this release contains far more fixes than a regular NumPy bugfix release. It also includes a number of documentation and build improvements. Sources and binary installers can be found at https://sourceforge.net/projects/numpy/files/NumPy/1.6.2rc1/ Please test this release and report any issues on the numpy-discussion mailing list. ... BLD: add support for the new X11 directory structure on Ubuntu co. We've just discovered that this fix is not enough. Actually the new directories are due to the multi-arch feature of Debian systems, that allows to install libraries from other (foreign) architectures than the one the machine is (the classic example, i386 libraries on a amd64 host). the fix included to look up in additional directories is currently only for X11, while for example Debian has fftw3 that's multi-arch-ified and thus will fail to be detected. Could this fix be extended to include all other things that are checked? for reference the bug in Debian is [1]; there was also a patch[2] in previous versions, that was using gcc to get the multi-arch paths - you might use as a reference, or to implement something debian-systems-specific. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640940 [2] http://anonscm.debian.org/viewvc/python-modules/packages/numpy/trunk/debian/patches/50_search-multiarch-paths.patch?view=markuppathrev=21168 It would be awesome is such support would end up in 1.6.2 . Hardcoding some more paths to check in distutils/system_info.py should be OK, also for 1.6.2 (will require a new RC). The --print-multiarch thing looks very questionable. As far as I can tell, it's a Debian specific gcc patch, only available in gcc 4.6 and up. Ubuntu before 11.10 release also doesn't have it. Therefore I don't think use of --print-multiarch is appropriate for numpy for now, and certainly not a change I'd like to make to distutils right before a release. If anyone with access to a Debian/Ubuntu system could come up with a patch which adds the right paths to system_info.py, that would be great. Hi, if there's anyone wants to have a look at the above issue this week, that would be great. If there's a patch by this weekend I can create a second RC, so we can still have the final release before the end of this month (needed for Debian freeze). Otherwise a second RC won't be needed. For NumPy 1.7.0, the issue is fixed for X11 by the following lines: if os.path.exists('/usr/lib/X11'): globbed_x11_dir = glob('/usr/lib/*/libX11.so') if globbed_x11_dir: x11_so_dir = os.path.split(globbed_x11_dir[0])[0] default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11']) default_x11_include_dirs.extend(['/usr/lib/X11/include', '/usr/include/X11']) in numpy/distutils/system_info.py, there is still an issue of supporting Debian multi-arch fully: http://projects.scipy.org/numpy/ticket/2150 However, I don't understand what exactly it means. Ralf, would would be a canonical example to fix? If I use for example x11, I get: In [1]: from numpy.distutils.system_info import get_info In [2]: get_info(x11, 2) /home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/distutils/system_info.py:551: UserWarning: Specified path /usr/X11R6/lib64 is invalid. warnings.warn('Specified path %s is invalid.' % d) /home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/distutils/system_info.py:551: UserWarning: Specified path /usr/X11R6/lib is invalid. warnings.warn('Specified path %s is invalid.' % d) /home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/distutils/system_info.py:551: UserWarning: Specified path /usr/X11/lib64 is invalid. warnings.warn('Specified path %s is invalid.' % d) /home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/distutils/system_info.py:551: UserWarning: Specified path /usr/X11/lib is invalid. warnings.warn('Specified path %s is invalid.' % d) /home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/distutils/system_info.py:551: UserWarning: Specified path /usr/lib64 is invalid. warnings.warn('Specified path %s is invalid.' % d) /home/ondrej/repos/numpy/py27/lib/python2.7/site-packages/numpy/distutils/system_info.py:551: UserWarning: Specified path /usr/X11R6/include is invalid. warnings.warn('Specified path %s is invalid.' % d)
[Numpy-discussion] Access to SPARC 64
Hi, Does anyone have a SPARC 64 machine that I could have an access to, so that I can try to reproduce and fix the following issue? http://projects.scipy.org/numpy/ticket/2076 That would be greatly appreciated, as it is currently marked as a blocker for 1.7.0. Thanks, Ondrej ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Access to SPARC 64
On 8/30/12 10:10 PM, Ondřej Čertík wrote: Hi, Does anyone have a SPARC 64 machine that I could have an access to, so that I can try to reproduce and fix the following issue? http://projects.scipy.org/numpy/ticket/2076 That would be greatly appreciated, as it is currently marked as a blocker for 1.7.0. You might ask on sage-devel. They were just talking about SPARC machines the other day on sage-devel. Thanks, Jason ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Issues for 1.7.0
Hi, I am keeping track of all issues that need to be done for the 1.7.0 release here: https://github.com/numpy/numpy/issues/396 If you have trac and github push access, here is how you can help (by closing/merging): Issues that need clarification: http://projects.scipy.org/numpy/ticket/2150 http://projects.scipy.org/numpy/ticket/2101 Issues fixed (should be closed): http://projects.scipy.org/numpy/ticket/2185 http://projects.scipy.org/numpy/ticket/2066 http://projects.scipy.org/numpy/ticket/2189 PRs that need merging: https://github.com/numpy/numpy/pull/395 https://github.com/numpy/numpy/pull/397 There are still a few more (see my github issue above), that I am working on right now. Thanks, Ondrej ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion