[Numpy-discussion] Pretty printing an array: no ellipses?

2006-07-19 Thread Webb Sprague
I am not sure where to look for this, sorry if it is RTFM or JPS (just plain stupid): Is there a way to set a default to print the entire array, rather than an ellipses version of it? If not, why doesn't pprint.pformat(numpy.random.normal(0,1,(100, 100)), width=1000) at least give me something

[Numpy-discussion] Finding indices for all rows which contain nan (or anything else)

2006-07-13 Thread Webb Sprague
Does anyone have some vectorized code that pulls out all the row indices for any row which has an nan (or a number less than 1 or whatever). I want to subsequently be able to perform an operation with all the good rows. See the imaginary code below. a = numpy.array([[1,2],[nan,1], [2,3]])

Re: [Numpy-discussion] Finding indices for all rows which contain nan (or anything else)

2006-07-13 Thread Webb Sprague
On 7/13/06, Robert Kern [EMAIL PROTECTED] wrote: Webb Sprague wrote: Does anyone have some vectorized code that pulls out all the row def is_row_nan(a): return numpy.isnan(a).any(axis=-1) I knew there was a way, but I didn't know to check any() and all(). Thanks to all (I love free

[Numpy-discussion] numpy.average(fooArray, axis=0): dropping nans from calculation

2006-07-13 Thread Webb Sprague
Could someone recommend a way to average an array along the columns without propagating the nans and without turning them into some weird number which bias the result? I guess I can just keep using an indexing array for fooArray, but if there is somehting more graceful, I would love to know. Boy

[Numpy-discussion] Does zero based indexing drive anyone else crazy?

2006-07-02 Thread Webb Sprague
Hi Numpeans, I have been working on a web-based scientific application for about a year, most of which had been written in either Matlab or SPLUS/R. My task has been to make it driveable through an online interface (if anyone cares about mortality forecasting, drop me an email and we can chat

[Numpy-discussion] Problem installing numpy on Gentoo

2006-06-21 Thread Webb Sprague
I am trying to install numpy on Gentoo (see my info below for version etc). It all seems to go fine, but when I try to import it and run the tests, I get the following error (in ipython): In [1]: import numpy import linalg - failed: libg2c.so.0: cannot open shared object file: No such file or