[Numpy-discussion] saving object array to ascii file

2010-05-06 Thread Maria Liukis
Hello Everybody, Sorry if it's a trivial question. I'm trying to find out if there is a way to save object array to ascii file. numpy.savetxt() in NumPy V1.3.0 doesn't seem to work: import numpy as np obj_arr = np.zeros((2,), dtype=np.object) obj_arr[0] = np.array([[1,2,3], [4,5,6],

[Numpy-discussion] loadtxt raises an exception on empty file

2010-05-24 Thread Maria Liukis
Hello everybody, I'm using numpy V1.3.0 and ran into a case when numpy.loadtxt('foo.txt') raised an exception: import numpy as np np.loadtxt('foo.txt') Traceback (most recent call last): File stdin, line 1, in module File

Re: [Numpy-discussion] bool indices segv

2010-06-22 Thread Maria Liukis
Hi Geoff, It's working in numpy V1.3.0: import numpy numpy.__version__ '1.3.0' a = numpy.ones((1,1)) a[a0] array([ 1.]) Thanks, Masha liu...@usc.edu On Jun 22, 2010, at 4:37 PM, Geoffrey Ely wrote: Hi, I'm getting a SEGV for boolean indices to a

Re: [Numpy-discussion] scipy.stats.poisson.ppf raises OverflowError: cannot convert float infinity to long

2009-08-04 Thread Maria Liukis
Josef, Thanks a bunch! Masha liu...@usc.edu On Aug 4, 2009, at 4:01 PM, josef.p...@gmail.com wrote: On Tue, Aug 4, 2009 at 6:36 PM, Maria Liukisliu...@usc.edu wrote: Hello everybody, I'm using the following versions of scipy and numpy: scipy.__version__ '0.6.0'

[Numpy-discussion] Indexing empty array with empty boolean array causes IndexError: invalid index exception

2009-08-10 Thread Maria Liukis
Hello everybody, I'm using following versions of Scipy and Numpy packages: scipy.__version__ '0.7.1' np.__version__ '1.3.0' My code uses boolean array to filter 2-dimensional array which sometimes happens to be an empty array. It seems like I have to take special care when dimension I'm

Re: [Numpy-discussion] Indexing empty array with empty boolean array causes IndexError: invalid index exception

2009-08-10 Thread Maria Liukis
A correction for the typo below. Thanks, Masha liu...@usc.edu On Aug 10, 2009, at 12:19 PM, Maria Liukis wrote: Hello everybody, I'm using following versions of Scipy and Numpy packages: scipy.__version__ '0.7.1' np.__version__ '1.3.0' My code uses boolean array

Re: [Numpy-discussion] Indexing empty array with empty boolean array causes IndexError: invalid index exception

2009-08-17 Thread Maria Liukis
On Aug 12, 2009, at 9:25 AM, Robert Kern wrote: On Mon, Aug 10, 2009 at 14:19, Maria Liukisliu...@usc.edu wrote: Hello everybody, I'm using following versions of Scipy and Numpy packages: scipy.__version__ '0.7.1' np.__version__ '1.3.0' My code uses boolean array to filter 2-dimensional

[Numpy-discussion] unique rows of array

2009-08-17 Thread Maria Liukis
Hello everybody, While re-implementing some Matlab code in Python, I've run into a problem of finding a NumPy function analogous to the Matlab's unique (array, 'rows') to get unique rows of an array. Searching the web, I've found a similar discussion from couple of years ago with an

Re: [Numpy-discussion] unique rows of array

2009-08-17 Thread Maria Liukis
Josef, Thanks, I'll try that and will search for your question from last december :) Masha liu...@usc.edu On Aug 17, 2009, at 9:44 PM, josef.p...@gmail.com wrote: On Tue, Aug 18, 2009 at 12:30 AM, Maria Liukisliu...@usc.edu wrote: Hello everybody, While

Re: [Numpy-discussion] unique rows of array

2009-08-17 Thread Maria Liukis
On Aug 17, 2009, at 9:51 PM, Charles R Harris wrote: On Mon, Aug 17, 2009 at 10:30 PM, Maria Liukis liu...@usc.edu wrote: Hello everybody, While re-implementing some Matlab code in Python, I've run into a problem of finding a NumPy function analogous to the Matlab's unique(array, 'rows

Re: [Numpy-discussion] unique rows of array

2009-08-17 Thread Maria Liukis
On Aug 17, 2009, at 10:03 PM, josef.p...@gmail.com wrote: On Tue, Aug 18, 2009 at 12:59 AM, Maria Liukisliu...@usc.edu wrote: On Aug 17, 2009, at 9:51 PM, Charles R Harris wrote: On Mon, Aug 17, 2009 at 10:30 PM, Maria Liukis liu...@usc.edu wrote: Hello everybody, While re

Re: [Numpy-discussion] unique rows of array

2009-08-18 Thread Maria Liukis
:51 PM, Charles R Harris wrote: On Mon, Aug 17, 2009 at 10:30 PM, Maria Liukis liu...@usc.edu wrote: Hello everybody, While re-implementing some Matlab code in Python, I've run into a problem of finding a NumPy function analogous to the Matlab's unique(array, 'rows') to get unique rows