[Numpy-discussion] new chararray test fails on Mac OS X

2008-07-10 Thread Christopher Hanley
From the svn log it looks like the tests are intended to fail? However I would prefer tests that are designed only to fail when problems occur. Otherwise we end up with problems with our automatic build and test scripts. Thanks, Chris

Re: [Numpy-discussion] new chararray test fails on Mac OS X

2008-07-10 Thread Alan McIntyre
On Thu, Jul 10, 2008 at 10:06 AM, Christopher Hanley [EMAIL PROTECTED] wrote: From the svn log it looks like the tests are intended to fail? However I would prefer tests that are designed only to fail when problems occur. Otherwise we end up with problems with our automatic build and test

Re: [Numpy-discussion] expected a single-segment buffer object

2008-07-10 Thread Anne Archibald
2008/7/9 Robert Kern [EMAIL PROTECTED]: Because that's just what a buffer= argument *is*. It is not a place for presenting the starting pointer to exotically-strided memory. Use __array_interface__s to describe the full range of representable memory. See below. Aha! Is this stuff documented

Re: [Numpy-discussion] expected a single-segment buffer object

2008-07-10 Thread Charles R Harris
On Thu, Jul 10, 2008 at 9:33 AM, Anne Archibald [EMAIL PROTECTED] wrote: 2008/7/9 Robert Kern [EMAIL PROTECTED]: Because that's just what a buffer= argument *is*. It is not a place for presenting the starting pointer to exotically-strided memory. Use __array_interface__s to describe the

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Charles R Harris
On Thu, Jul 10, 2008 at 10:38 AM, Dan Lussier [EMAIL PROTECTED] wrote: Hello, I am relatively new to numpy and am having trouble with the speed of a specific array based calculation that I'm trying to do. What I'm trying to do is to calculate the total total potential energy and

Re: [Numpy-discussion] expected a single-segment buffer object

2008-07-10 Thread Stéfan van der Walt
2008/7/10 Robert Kern [EMAIL PROTECTED]: I was about a week ahead of you. See numpy/lib/stride_tricks.py in the trunk. Robert, this is fantastic! I think people are going to enjoy your talk at SciPy'08. If you want, we could also tutor this in the advanced NumPy session. Cheers Stéfan

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Bruce Southey
Charles R Harris wrote: On Thu, Jul 10, 2008 at 10:38 AM, Dan Lussier [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello, I am relatively new to numpy and am having trouble with the speed of a specific array based calculation that I'm trying to do. What I'm trying

Re: [Numpy-discussion] expected a single-segment buffer object

2008-07-10 Thread Anne Archibald
2008/7/10 Charles R Harris [EMAIL PROTECTED]: On Thu, Jul 10, 2008 at 9:33 AM, Anne Archibald [EMAIL PROTECTED] wrote: 2008/7/9 Robert Kern [EMAIL PROTECTED]: Because that's just what a buffer= argument *is*. It is not a place for presenting the starting pointer to exotically-strided

Re: [Numpy-discussion] python user defined type

2008-07-10 Thread Christopher Barker
Nicolas Rougier wrote: I would like to create numpy array with my own (python) datatype, so I tried the obvious solution: from numpy import * class Unit(object): def __init__(self,value=0.0): self.value = value def __float__(self): return self.value def

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Anne Archibald
2008/7/10 Dan Lussier [EMAIL PROTECTED]: I am relatively new to numpy and am having trouble with the speed of a specific array based calculation that I'm trying to do. What I'm trying to do is to calculate the total total potential energy and coordination number of each atom within a

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Charles R Harris
On Thu, Jul 10, 2008 at 2:55 PM, Anne Archibald [EMAIL PROTECTED] wrote: 2008/7/10 Dan Lussier [EMAIL PROTECTED]: I am relatively new to numpy and am having trouble with the speed of a specific array based calculation that I'm trying to do. What I'm trying to do is to calculate the

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Bill Baxter
On Fri, Jul 11, 2008 at 5:55 AM, Anne Archibald [EMAIL PROTECTED] wrote: 2008/7/10 Dan Lussier [EMAIL PROTECTED]: We seem to get quite a few posts from people wanting some kind of spatial data structure (whether they know it or not). Would it make sense to come up with some kind of compiled

Re: [Numpy-discussion] expected a single-segment buffer object

2008-07-10 Thread Charles R Harris
On Thu, Jul 10, 2008 at 2:25 PM, Anne Archibald [EMAIL PROTECTED] wrote: 2008/7/10 Charles R Harris [EMAIL PROTECTED]: On Thu, Jul 10, 2008 at 9:33 AM, Anne Archibald [EMAIL PROTECTED] wrote: 2008/7/9 Robert Kern [EMAIL PROTECTED]: Because that's just what a buffer= argument

Re: [Numpy-discussion] python user defined type

2008-07-10 Thread Nicolas Rougier
Thanks for the precise explanation that make things clearer. In fact, the example I gave was mainly to illustrate my question in the quickest way. Concerning the dtype argument during array creation, I thought it was here for somehow controlling the type of array elements. For example, if I use

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Stéfan van der Walt
2008/7/10 Anne Archibald [EMAIL PROTECTED]: Unfortunately, implementing most of the algorithms in the literature within numpy is going to be fairly cumbersome. But I think there are better algorithms you could try: There's also http://pypi.python.org/pypi/scikits.ann Regards Stéfan

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Christopher Barker
Anne Archibald wrote: Unfortunately, implementing most of the algorithms in the literature within numpy is going to be fairly cumbersome. Maybe this rtree implementation would help: http://pypi.python.org/pypi/Rtree -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Andrew Dalke
On Jul 10, 2008, at 6:38 PM, Dan Lussier wrote: What I'm trying to do is to calculate the total total potential energy and coordination number of each atom within a relatively large simulation. Anne Archibald already responded: you could try a three-dimensional grid (if your atoms aren't too

Re: [Numpy-discussion] expected a single-segment buffer object

2008-07-10 Thread Robert Kern
On Thu, Jul 10, 2008 at 10:33, Anne Archibald [EMAIL PROTECTED] wrote: 2008/7/9 Robert Kern [EMAIL PROTECTED]: Because that's just what a buffer= argument *is*. It is not a place for presenting the starting pointer to exotically-strided memory. Use __array_interface__s to describe the full

Re: [Numpy-discussion] new chararray test fails on Mac OS X

2008-07-10 Thread Robert Kern
On Thu, Jul 10, 2008 at 09:26, Alan McIntyre [EMAIL PROTECTED] wrote: On Thu, Jul 10, 2008 at 10:06 AM, Christopher Hanley [EMAIL PROTECTED] wrote: From the svn log it looks like the tests are intended to fail? However I would prefer tests that are designed only to fail when problems

Re: [Numpy-discussion] new chararray test fails on Mac OS X

2008-07-10 Thread Alan McIntyre
On Thu, Jul 10, 2008 at 8:14 PM, Robert Kern [EMAIL PROTECTED] wrote: For things that you don't expect to be platform specific, there is no need. For things that you do expect to be platform specific on platforms that you cannot access, please ask for volunteers. Make an SVN branch if the

Re: [Numpy-discussion] new chararray test fails on Mac OS X

2008-07-10 Thread Robert Kern
On Thu, Jul 10, 2008 at 19:20, Alan McIntyre [EMAIL PROTECTED] wrote: On Thu, Jul 10, 2008 at 8:14 PM, Robert Kern [EMAIL PROTECTED] wrote: For things that you don't expect to be platform specific, there is no need. For things that you do expect to be platform specific on platforms that you

Re: [Numpy-discussion] huge array calculation speed

2008-07-10 Thread Charles R Harris
On Thu, Jul 10, 2008 at 5:48 PM, Andrew Dalke [EMAIL PROTECTED] wrote: snip You can also grab the KDTree from Biopython, which is implemented in C. http://www.biopython.org/DIST/docs/api/Bio.KDTree.KDTree'-module.htmlhttp://www.biopython.org/DIST/docs/api/Bio.KDTree.KDTree%27-module.html