Re: [Numpy-discussion] Building Numpy Windows Superpack

2010-03-05 Thread David Cournapeau
On Fri, Mar 5, 2010 at 1:22 PM, Patrick Marsh wrote: > > I've run the Numpy superpack installer for Python 2.6 built with MinGW > through the dependency walker.  Unfortunately, outside of checking for some > extremely obviously things, I'm in way over my head in interpreting the > output (althoug

Re: [Numpy-discussion] Iterative Matrix Multiplication

2010-03-05 Thread Ian Mallett
Cool--this works perfectly now :-) Unfortunately, it's actually slower :P Most of the slowest part is in the removing doubles section. Some of the costliest calls: #takes 0.04 seconds inner = np.inner(ns, v1s - some_point) #0.0840001106262 sum_1 = sum.reshape((len(sum), 1)).repeat(len(sum), ax

Re: [Numpy-discussion] printing structured arrays

2010-03-05 Thread Gökhan Sever
On Fri, Mar 5, 2010 at 8:00 AM, Bruce Schultz wrote: > Hi, > > I've just started playing with numpy and have noticed that when printing a > structured array that the output is not nicely formatted. Is there a way to > make the formatting look the same as it does for an unstructured array? > > Her

Re: [Numpy-discussion] Iterative Matrix Multiplication

2010-03-05 Thread Friedrich Romstedt
Do you have doublets in the v_array? In case not, then you owe me a donut. See attachment. Friedrich P.S.: You misunderstood too, the line you wanted to change was in context to detect back-facing triangles, and there one vertex is sufficient. shading.py Description: Binary data _

Re: [Numpy-discussion] multiprocessing shared arrays and numpy

2010-03-05 Thread Brian Granger
Francesc, Yeah, 10% of improvement by using multi-cores is an expected figure for > memory > bound problems. This is something people must know: if their computations > are > memory bound (and this is much more common that one may initially think), > then > they should not expect significant spee

Re: [Numpy-discussion] Loading bit strings

2010-03-05 Thread Zachary Pincus
> Is there a good way in NumPy to convert from a bit string to a boolean > array? > > For example, if I have a 2-byte string s='\xfd\x32', I want to get a > 16-length boolean array out of it. numpy.unpackbits(numpy.fromstring('\xfd\x32', dtype=numpy.uint8)) ___

Re: [Numpy-discussion] Is this a bug in numpy.ma.reduce?

2010-03-05 Thread David Goldsmith
On Fri, Mar 5, 2010 at 9:43 AM, David Goldsmith wrote: > On Fri, Mar 5, 2010 at 9:22 AM, David Goldsmith > wrote: > >> On Fri, Mar 5, 2010 at 2:51 AM, Pierre GM wrote: >> >>> On Mar 5, 2010, at 4:38 AM, David Goldsmith wrote: >>> > Hi! Sorry for the cross-post, but my own investigation has led

Re: [Numpy-discussion] Is this a bug in numpy.ma.reduce?

2010-03-05 Thread David Goldsmith
On Fri, Mar 5, 2010 at 9:22 AM, David Goldsmith wrote: > On Fri, Mar 5, 2010 at 2:51 AM, Pierre GM wrote: > >> On Mar 5, 2010, at 4:38 AM, David Goldsmith wrote: >> > Hi! Sorry for the cross-post, but my own investigation has led me to >> suspect that mine is actually a numpy problem, not a matp

Re: [Numpy-discussion] Loading bit strings

2010-03-05 Thread Robert Kern
On Fri, Mar 5, 2010 at 11:11, Dan Lenski wrote: > Is there a good way in NumPy to convert from a bit string to a boolean > array? > > For example, if I have a 2-byte string s='\xfd\x32', I want to get a > 16-length boolean array out of it. > > Here's what I came up with: > > A = fromstring(s, dtyp

Re: [Numpy-discussion] Is this a bug in numpy.ma.reduce?

2010-03-05 Thread David Goldsmith
On Fri, Mar 5, 2010 at 2:51 AM, Pierre GM wrote: > On Mar 5, 2010, at 4:38 AM, David Goldsmith wrote: > > Hi! Sorry for the cross-post, but my own investigation has led me to > suspect that mine is actually a numpy problem, not a matplotlib problem. > I'm getting the following traceback from a

[Numpy-discussion] Loading bit strings

2010-03-05 Thread Dan Lenski
Is there a good way in NumPy to convert from a bit string to a boolean array? For example, if I have a 2-byte string s='\xfd\x32', I want to get a 16-length boolean array out of it. Here's what I came up with: A = fromstring(s, dtype=uint8) out = empty(A.size * 8, dtype=bool) for bit in range(0,

Re: [Numpy-discussion] multiprocessing shared arrays and numpy

2010-03-05 Thread Francesc Alted
A Friday 05 March 2010 14:46:00 Gael Varoquaux escrigué: > On Fri, Mar 05, 2010 at 08:14:51AM -0500, Francesc Alted wrote: > > > FWIW, I observe very good speedups on my problems (pretty much linear > > > in the number of CPUs), and I have data parallel problems on fairly > > > large data (~100Mo a

Re: [Numpy-discussion] Why does np.nan{min, max} clobber my array mask?

2010-03-05 Thread Bruce Southey
On Mon, Feb 15, 2010 at 9:24 PM, Bruce Southey wrote: > On Mon, Feb 15, 2010 at 8:35 PM, Pierre GM wrote: >> On Feb 15, 2010, at 8:51 PM, David Carmean wrote: >>> On Sun, Feb 14, 2010 at 03:22:04PM -0500, Pierre GM wrote: >>> I'm sorry, I can't follow you. Can you post a simpler self-co

[Numpy-discussion] printing structured arrays

2010-03-05 Thread Bruce Schultz
Hi, I've just started playing with numpy and have noticed that when printing a structured array that the output is not nicely formatted. Is there a way to make the formatting look the same as it does for an unstructured array? Here an example of what I mean: data = [ (1, 2), (3, 4.1) ] dtype = [

Re: [Numpy-discussion] multiprocessing shared arrays and numpy

2010-03-05 Thread Gael Varoquaux
On Fri, Mar 05, 2010 at 08:14:51AM -0500, Francesc Alted wrote: > > FWIW, I observe very good speedups on my problems (pretty much linear in > > the number of CPUs), and I have data parallel problems on fairly large > > data (~100Mo a piece, doesn't fit in cache), with no synchronisation at > > all

Re: [Numpy-discussion] multiprocessing shared arrays and numpy

2010-03-05 Thread Francesc Alted
Gael, On Fri, Mar 05, 2010 at 10:51:12AM +0100, Gael Varoquaux wrote: > On Fri, Mar 05, 2010 at 09:53:02AM +0100, Francesc Alted wrote: > > Yeah, 10% of improvement by using multi-cores is an expected figure for > > memory bound problems. This is something people must know: if their > > computati

Re: [Numpy-discussion] Is this a bug in numpy.ma.reduce?

2010-03-05 Thread Vincent Schut
On 03/05/2010 11:51 AM, Pierre GM wrote: > On Mar 5, 2010, at 4:38 AM, David Goldsmith wrote: >> Hi! Sorry for the cross-post, but my own investigation has led me to >> suspect that mine is actually a numpy problem, not a matplotlib problem. >> I'm getting the following traceback from a call to

Re: [Numpy-discussion] Is this a bug in numpy.ma.reduce?

2010-03-05 Thread Pierre GM
On Mar 5, 2010, at 4:38 AM, David Goldsmith wrote: > Hi! Sorry for the cross-post, but my own investigation has led me to suspect > that mine is actually a numpy problem, not a matplotlib problem. I'm getting > the following traceback from a call to matplotlib.imshow: > ... > Based on examinati

Re: [Numpy-discussion] multiprocessing shared arrays and numpy

2010-03-05 Thread Gael Varoquaux
On Fri, Mar 05, 2010 at 09:53:02AM +0100, Francesc Alted wrote: > Yeah, 10% of improvement by using multi-cores is an expected figure for > memory bound problems. This is something people must know: if their > computations are memory bound (and this is much more common that one > may initially thi

[Numpy-discussion] Is this a bug in numpy.ma.reduce?

2010-03-05 Thread David Goldsmith
Hi! Sorry for the cross-post, but my own investigation has led me to suspect that mine is actually a numpy problem, not a matplotlib problem. I'm getting the following traceback from a call to matplotlib.imshow: Traceback (most recent call last): File "C:\Users\Fermat\Documents\Fractals\Python\S

Re: [Numpy-discussion] multiprocessing shared arrays and numpy

2010-03-05 Thread Francesc Alted
Yeah, 10% of improvement by using multi-cores is an expected figure for memory bound problems. This is something people must know: if their computations are memory bound (and this is much more common that one may initially think), then they should not expect significant speed-ups on their paral