[Numpy-discussion] Regrading Numpy Documentation ...

2010-11-15 Thread srinivas zinka
Hi, I downloaded the Numpy reference guide in HTML format from the following link: http://docs.scipy.org/doc/ My intension is to use this documentation in offline mode. But, in offline mode, I am unable to search the document using quick search option. (However, I can search the same document

Re: [Numpy-discussion] Regrading Numpy Documentation ...

2010-11-15 Thread Scott Sinclair
On 15 November 2010 12:02, srinivas zinka zink...@gmail.com wrote: I downloaded the Numpy reference guide in HTML format from the following link: http://docs.scipy.org/doc/ My intension is to use this documentation in offline mode. But, in offline mode,  I am unable to search the document

Re: [Numpy-discussion] numpy.genfromtxt converters issue

2010-11-15 Thread Lluís
Pierre GM writes: On Nov 14, 2010, at 9:30 PM, Lluís wrote: This will work as long as 'first_values' is assured to always contain valid data and as long as its indexes are equivalent to those in converters (which I simply haven't checked). I beat you to it, actually ;) Argh! :) Check

Re: [Numpy-discussion] numpy.genfromtxt converters issue

2010-11-15 Thread Pierre GM
On Nov 15, 2010, at 1:07 PM, Lluís wrote: Pierre GM writes: On Nov 14, 2010, at 9:30 PM, Lluís wrote: This will work as long as 'first_values' is assured to always contain valid data and as long as its indexes are equivalent to those in converters (which I simply haven't checked). I

Re: [Numpy-discussion] Regrading Numpy Documentation ...

2010-11-15 Thread Robert Kern
On Mon, Nov 15, 2010 at 06:15, srinivas zinka zink...@gmail.com wrote: Thank you for the reply. I just downloaded the following zip file: http://docs.scipy.org/doc/numpy-1.5.x/numpy-html.zip When I try to search for some thing (e.g., array), it keeps on searching (see the attached file). At 

[Numpy-discussion] Printing formatted numerical values

2010-11-15 Thread pv+numpy
Hi, what is the best way to print (to a file or to stdout) formatted numerical values? Analogously to C's printf(%d %g,x,y) etc? Numpy Documentation only discusses input *from* a file, or output of entire arrays. (np.savetxt()) I just want tab or space-delimited output of selected formatted

[Numpy-discussion] getitem and slice

2010-11-15 Thread Keith Goodman
There is more than one way to form the same slice. For example, a[:2] and a[0:2] and a[0:2:] pass slice objects to getitem with the same start, stop and step. Is there any way to get a hold of the exact character sequence the user used to form the slice? That is, I'd like to know if the user

Re: [Numpy-discussion] Printing formatted numerical values

2010-11-15 Thread Gerrit Holl
On 15 November 2010 15:32, pv+nu...@math.duke.edu wrote: Hi, what is the best way to print (to a file or to stdout) formatted numerical values? Analogously to C's printf(%d %g,x,y) etc? Use the .tofile() method: numpy.random.random(5).tofile(sys.stdout, ' ', '%s') 0.230466435867

Re: [Numpy-discussion] Printing formatted numerical values

2010-11-15 Thread Robert Kern
On Mon, Nov 15, 2010 at 08:32, pv+nu...@math.duke.edu wrote: Hi, what is the best way to print (to a file or to stdout) formatted numerical values? Analogously to C's printf(%d %g,x,y) etc? Numpy Documentation only discusses input *from* a file, or output of entire arrays. (np.savetxt()) I

Re: [Numpy-discussion] Printing formatted numerical values

2010-11-15 Thread Dave Hirschfeld
pv+numpy at math.duke.edu writes: Hi, what is the best way to print (to a file or to stdout) formatted numerical values? Analogously to C's printf(%d %g,x,y) etc? For stdout you can simply do: In [26]: w, x, y, z = np.randint(0,100,4) In [27]: type(w) Out[27]: type 'numpy.int32' In

Re: [Numpy-discussion] Printing formatted numerical values

2010-11-15 Thread Jonathan Hilmer
Is there a convention for dealing with NaN and Inf? I've found that trusting the default behavior is a very bad idea: --- from numpy import * x = zeros((5,7)) x[:,3:] = nan x[:,-1] = inf savetxt('problem_array.txt',x,delimiter='\t') x2 =

Re: [Numpy-discussion] Regrading Numpy Documentation ...

2010-11-15 Thread srinivas zinka
But, I have no problem searching python HTML documentation which is also created by Sphinx. I don't know much about JavaScript. But, don't they both use the same JavaScript? On Mon, Nov 15, 2010 at 11:02 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Nov 15, 2010 at 06:15, srinivas

Re: [Numpy-discussion] Workaround for Ticket #1504 (MKL linking)

2010-11-15 Thread Felix
On Nov 15, 2:00 am, Dag Sverre Seljebotn wrote: On 11/15/2010 06:23 AM, Felix wrote: is there any workaround or fix for the problem described in Ticket 1504? http://projects.scipy.org/numpy/ticket/1504 You can try to see if sys.setdlopenflags works for you, it does for me:

Re: [Numpy-discussion] Workaround for Ticket #1504 (MKL linking)

2010-11-15 Thread Bruce Southey
On 11/15/2010 11:48 AM, Felix wrote: On Nov 15, 2:00 am, Dag Sverre Seljebotn wrote: On 11/15/2010 06:23 AM, Felix wrote: is there any workaround or fix for the problem described in Ticket 1504? http://projects.scipy.org/numpy/ticket/1504 You can try to see if sys.setdlopenflags works for

Re: [Numpy-discussion] Implementing __format__

2010-11-15 Thread Christopher Barker
On 11/15/10 11:35 AM, Pauli Virtanen wrote: One can argue that this is a bug in Python or Numpy: %d % numpy.int16(1) {0:d}.format(numpy.int16(1)) To make it work via changes in Numpy: scalars should implement a __format__ method. Two choices: either we parse the formatting

Re: [Numpy-discussion] Problems testing the floating point flags

2010-11-15 Thread Charles R Harris
On Sun, Nov 14, 2010 at 1:29 PM, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Nov 14, 2010 at 12:21 PM, Charles R Harris charlesr.har...@gmail.com wrote: Good point. I was trying to keep the fpeclear in front of the code to be tested. Yeah, I hadn't considered that possibility too

[Numpy-discussion] --nocapture with numpy.testing.Tester

2010-11-15 Thread David Warde-Farley
Hi, I'm trying to use numpy.testing.Tester to run tests for another, numpy-based project. It works beautifully, except for the fact that I can't seem to silence output (i.e. NOSE_NOCAPTURE/--nocapture/-s). I've tried to call test with extra_argv=['-s'] and also tried subclassing to muck with

Re: [Numpy-discussion] dtypes error in recfunctions

2010-11-15 Thread Pierre GM
On Nov 15, 2010, at 11:43 PM, Benjamin Root wrote: Hello, I was using append_fields() in numpy.lib.recfunctions when I discovered a slight logic mistake in handling the dtypes argument. The code first checks to see if dtypes is None. If so, it then guesses the dtype info from the

Re: [Numpy-discussion] dtypes error in recfunctions

2010-11-15 Thread Benjamin Root
On Mon, Nov 15, 2010 at 4:57 PM, Pierre GM pgmdevl...@gmail.com wrote: On Nov 15, 2010, at 11:43 PM, Benjamin Root wrote: Hello, I was using append_fields() in numpy.lib.recfunctions when I discovered a slight logic mistake in handling the dtypes argument. The code first checks to

Re: [Numpy-discussion] Workaround for Ticket #1504 (MKL linking)

2010-11-15 Thread Felix
Bruce Southey bsouthey at gmail.com writes: On 11/15/2010 11:48 AM, Felix wrote: On Nov 15, 2:00 am, Dag Sverre Seljebotn wrote: On 11/15/2010 06:23 AM, Felix wrote: is there any workaround or fix for the problem described in Ticket 1504? http://projects.scipy.org/numpy/ticket/1504

Re: [Numpy-discussion] Regrading Numpy Documentation ...

2010-11-15 Thread Scott Sinclair
On 15 November 2010 14:15, srinivas zinka zink...@gmail.com wrote: Thank you for the reply. I just downloaded the following zip file: http://docs.scipy.org/doc/numpy-1.5.x/numpy-html.zip When I try to search for some thing (e.g., array), it keeps on searching (see the attached file). At the