[Numpy-discussion] First shot at svn->git conversion

2010-07-25 Thread David Cournapeau
Hi there, I have finally prepared and uploaded a test repository containing numpy code: http://github.com/numpy/numpy_svn Please check in particular that your account information are correctly recorded in the log. A few informations: - the repo was converted from a local svn mirror to git thro

Re: [Numpy-discussion] Arrays of Python Values

2010-07-25 Thread Ian Mallett
Hi, I've converted all of the code to use record arrays, for a 10-fold speed boost. Thanks, Ian ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] np.fromstring and Python 3

2010-07-25 Thread Pauli Virtanen
Sun, 25 Jul 2010 10:17:53 -0400, Thomas Robitaille wrote: > The following example illustrates a problem I'm encountering a problem > with the np.fromstring function in Python 3: > > Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18) [GCC 4.0.1 (Apple Inc. > build 5493)] on darwin Type "help", "copy

Re: [Numpy-discussion] Problem using polyutils.mapdomain with fromfunction

2010-07-25 Thread David Goldsmith
On Sun, Jul 25, 2010 at 7:08 AM, Charles R Harris wrote: > > On Sun, Jul 25, 2010 at 2:32 AM, David Goldsmith > wrote: > >> Why am I being told my coefficient array is not 1-d when both coefficient >> arrays--old and new--are reported to have shape (2L,): >> >> C:\Users\Fermat>python >> Python 2

[Numpy-discussion] np.fromstring and Python 3

2010-07-25 Thread Thomas Robitaille
Hi, The following example illustrates a problem I'm encountering a problem with the np.fromstring function in Python 3: Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> impo

Re: [Numpy-discussion] Problem using polyutils.mapdomain with fromfunction

2010-07-25 Thread Charles R Harris
On Sun, Jul 25, 2010 at 2:32 AM, David Goldsmith wrote: > Why am I being told my coefficient array is not 1-d when both coefficient > arrays--old and new--are reported to have shape (2L,): > > C:\Users\Fermat>python > Python 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit > (AMD64)] o

Re: [Numpy-discussion] segmentation fault when installing with pip and python2.7

2010-07-25 Thread Peter
On Sat, Jul 24, 2010 at 8:38 PM, David Cournapeau wrote: > > In general, because the packaging/build infrastructure in python is horrible. > > However, in this precise case, the issue is simply that numpy 1.4.1 > does not support python2.7. > How about a tiny update to the numpy 1.4.x on PyPi whi

Re: [Numpy-discussion] numpy.append and persisting original datatype

2010-07-25 Thread Martin Galpin
Hello, After a little more research, I can see that as a work around is: foo = np.append(foo, np.asanyarray([1., 2., 3.], dtype=foo.dtype)) It seems that within numpy.append(), the call to ravel() (numpy/ function.base.py [line 3490]) produces an array with a dtype that best fits. In this case i

[Numpy-discussion] Problem using polyutils.mapdomain with fromfunction

2010-07-25 Thread David Goldsmith
Why am I being told my coefficient array is not 1-d when both coefficient arrays--old and new--are reported to have shape (2L,): C:\Users\Fermat>python Python 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more in

Re: [Numpy-discussion] Sine Distribution on a 2D Array

2010-07-25 Thread Ian Mallett
Hi, After much deliberation, I found a passable solution: distances = np.abs(np.arange(0,resolution,1)+0.5-(resolution/2.0)) x_gradient = np.tile(distances,(resolution,1)) y_gradient = np.copy(x_gradient) y_gradient = np.swapaxes(y_gradient,0,1) distances_to_center = np.hypot(x_gradient,y_gradien

Re: [Numpy-discussion] Sine Distribution on a 2D Array

2010-07-25 Thread Christian K.
Am 25.07.10 06:38, schrieb Ian Mallett: > Hi, > > So I have a square 2D array, and I want to fill the array with sine > values. The values need to be generated by their coordinates within the > array. > > The center of the array should be treated as the angle 90 degrees. Each > of the four edges