Re: [Numpy-discussion] Numpy logo in VTK

2012-06-27 Thread Brennan Williams
You're now reminding me of the old spinning SGI logo http://www.youtube.com/watch?v=Nqf6TjE49N8 Brennan On 27/06/2012 10:40 a.m., klo uo wrote: I continued in this mpl trip, with small animation sequence: # animation ax.view_init(90,-90) plt.ion()

Re: [Numpy-discussion] Statistical distributions on samples

2011-08-14 Thread Brennan Williams
You can use scipy.stats.truncnorm, can't you? Unless I misread, you want to sample a normal distribution but with generated values only being within a specified range? However you also say you want to do this with triangular and log normal and for these I presume the easiest way is to sample

Re: [Numpy-discussion] Developer NumPy list versus User NumPy list

2011-01-27 Thread Brennan Williams
On 28/01/2011 1:07 p.m., Sturla Molden wrote: Den 28.01.2011 00:23, skrev Robert Kern: We've resisted it for years. I don't think the split has done scipy much good. The scope of NumPy is narrower development-wise and wider user-wise. While SciPy does not benefit, as use and development are

[Numpy-discussion] quadratic function

2010-10-28 Thread Brennan Williams
I have used both linear least squares and radial basis functions as a proxy equation, calculated from the results of computer simulations which are calculating some objective function value based on a number of varied input parameters. As an alternative option I want to add a quadratic

Re: [Numpy-discussion] quadratic function

2010-10-28 Thread Brennan Williams
On 29/10/2010 2:34 a.m., Robert Kern wrote: On Thu, Oct 28, 2010 at 06:38, Brennan Williams brennan.willi...@visualreservoir.com wrote: I have used both linear least squares and radial basis functions as a proxy equation, calculated from the results of computer simulations which

Re: [Numpy-discussion] quadratic function

2010-10-28 Thread Brennan Williams
On 29/10/2010 6:35 a.m., Robert Kern wrote: On Thu, Oct 28, 2010 at 12:33, Brennan Williams brennan.willi...@visualreservoir.com wrote: On 29/10/2010 2:34 a.m., Robert Kern wrote: On Thu, Oct 28, 2010 at 06:38, Brennan Williams brennan.willi...@visualreservoir.comwrote: I have

Re: [Numpy-discussion] Interpolation question

2010-03-29 Thread Brennan Williams
Andrea Gavana wrote: Hi Chris and All, On 29 March 2010 22:35, Christopher Barker wrote: Andrea Gavana wrote: Scaling each axis by its standard deviation is a typical first start. Shifting and scaling the values such that they each go from 0 to 1 is another useful thing to try.

Re: [Numpy-discussion] Interpolation question

2010-03-28 Thread Brennan Williams
Andrea Gavana wrote: HI All, On 28 March 2010 19:22, Robert Kern wrote: On Sun, Mar 28, 2010 at 03:26, Anne Archibald peridot.face...@gmail.com wrote: On 27 March 2010 20:24, Andrea Gavana andrea.gav...@gmail.com wrote: Hi All, I have an interpolation problem and I

Re: [Numpy-discussion] Interpolation question

2010-03-28 Thread Brennan Williams
Andrea Gavana wrote: Hi All, On 28 March 2010 22:14, Pierre GM wrote: On Mar 28, 2010, at 4:47 PM, Andrea Gavana wrote: HI All, On 28 March 2010 19:22, Robert Kern wrote: On Sun, Mar 28, 2010 at 03:26, Anne Archibald peridot.face...@gmail.com wrote: On 27

Re: [Numpy-discussion] Interpolation question

2010-03-28 Thread Brennan Williams
Andrea Gavana wrote: Hi Friedrich All, On 28 March 2010 23:51, Friedrich Romstedt wrote: 2010/3/28 Andrea Gavana andrea.gav...@gmail.com: Example 1 # o2 and o3 are the number of production wells, split into 2 # different categories # inj is the number of injection wells #

Re: [Numpy-discussion] Interpolation question

2010-03-28 Thread Brennan Williams
Andrea Gavana wrote: On 29 March 2010 00:34, Robert Kern wrote: On Sun, Mar 28, 2010 at 18:30, Andrea Gavana andrea.gav...@gmail.com wrote: Hi Friedrich All, On 28 March 2010 23:51, Friedrich Romstedt wrote: 2010/3/28 Andrea Gavana andrea.gav...@gmail.com:

Re: [Numpy-discussion] how to efficiently build an array of x, y, z points

2010-03-04 Thread Brennan Williams
Christopher Barker wrote: Bruce Southey wrote: Christopher Barker provided some code last last year on appending ndarrays eg: http://mail.scipy.org/pipermail/numpy-discussion/2009-November/046634.html yup, Id love someone else to pick that up and test/improve it. Anyway, that code

Re: [Numpy-discussion] how to efficiently build an array of x, y, z points

2010-03-03 Thread Brennan Williams
Bruce Southey wrote: On 03/02/2010 09:47 PM, David Goldsmith wrote: On Tue, Mar 2, 2010 at 6:59 PM, Brennan Williams brennan.willi...@visualreservoir.com mailto:brennan.willi...@visualreservoir.com wrote: David Goldsmith wrote: On Tue, Mar 2, 2010 at 6:29 PM, Brennan

[Numpy-discussion] how to efficiently build an array of x, y, z points

2010-03-02 Thread Brennan Williams
I'm reading a file which contains a grid definition. Each cell in the grid, apart from having an i,j,k index also has 8 x,y,z coordinates. I'm reading each set of coordinates into a numpy array. I then want to add/append those coordinates to what will be my large points array. Due to the

Re: [Numpy-discussion] how to efficiently build an array of x, y, z points

2010-03-02 Thread Brennan Williams
David Goldsmith wrote: On Tue, Mar 2, 2010 at 6:29 PM, Brennan Williams brennan.willi...@visualreservoir.com mailto:brennan.willi...@visualreservoir.com wrote: I'm reading a file which contains a grid definition. Each cell in the grid, apart from having an i,j,k index also has 8

[Numpy-discussion] problem with FortranFile

2009-11-08 Thread Brennan Williams
I'm using FortranFile to read a binary Fortran file. It has a bit of header data at the top of the file which I'm reading with a combination of readString and struct.unpack This is then followed by a number of lines/records, each of which has 20 double precision reals/floats. For some reason it

Re: [Numpy-discussion] using FortranFile to read data from a binary Fortran file

2009-11-03 Thread Brennan Williams
Brennan Williams wrote: Hi I'm using FortranFile on 32 bit XP. The first record in the file has both 32 bit integer values and double precision float values. I've used readInts('i') to read the data into what I presume is a 32-bit integer numpy array. Items 0 and 1 of the array

[Numpy-discussion] using FortranFile to read data from a binary Fortran file

2009-11-03 Thread Brennan Williams
Hi I'm using FortranFile on 32 bit XP. The first record in the file has both 32 bit integer values and double precision float values. I've used readInts('i') to read the data into what I presume is a 32-bit integer numpy array. Items 0 and 1 of the array are the first double precision value.

Re: [Numpy-discussion] speeding up getting a subset of a data array

2009-08-10 Thread Brennan Williams
Brennan Williams wrote: Hi No doubt asked many times before so apologies I'm pulling a subset array out of a data array where I have a list of the indices I want (could be an array rather than a list actually - I have it in both). Potentially the number of points and the number

Re: [Numpy-discussion] speeding up getting a subset of a data array

2009-08-10 Thread Brennan Williams
josef.p...@gmail.com wrote: On Mon, Aug 10, 2009 at 8:52 PM, Brennan Williamsbrennan.willi...@visualreservoir.com wrote: Hi No doubt asked many times before so apologies I'm pulling a subset array out of a data array where I have a list of the indices I want (could be an array

[Numpy-discussion] npfile deprecation warning

2009-06-15 Thread Brennan Williams
Hi I'm using npfile which is giving me a deprecation warning. For the time being I want to continue using it but I would like to suppress the warning messages. Is it possible to trap the deprecation warning but still have the npfile go ahead? Thanks Brennan

Re: [Numpy-discussion] npfile deprecation warning

2009-06-15 Thread Brennan Williams
Robert Kern wrote: On Mon, Jun 15, 2009 at 17:27, Brennan Williamsbrennan.willi...@visualreservoir.com wrote: Hi I'm using npfile which is giving me a deprecation warning. For the time being I want to continue using it but I would like to suppress the warning messages. Is it possible to

Re: [Numpy-discussion] npfile deprecation warning

2009-06-15 Thread Brennan Williams
Robert Kern wrote: On Mon, Jun 15, 2009 at 18:48, Brennan Williamsbrennan.willi...@visualreservoir.com wrote: Robert Kern wrote: On Mon, Jun 15, 2009 at 17:27, Brennan Williamsbrennan.willi...@visualreservoir.com wrote: Hi I'm using npfile which is giving me a

[Numpy-discussion] CUDA

2009-05-26 Thread Brennan Williams
Not a question really but just for discussion/pie-in-the-sky etc This is a news item on vizworld about getting Matlab code to run on a CUDA enabled GPU. http://www.vizworld.com/2009/05/cuda-enable-matlab-with-gpumat/ If the use of GPU's for numerical tasks takes off (has it already?) then

[Numpy-discussion] replacing Nan's in a string array converted from a float array

2009-05-07 Thread Brennan Williams
I've created an array of strings using something like stringarray=self.karray.astype(|S8) If the array value is a Nan I get 1.#QNAN in my string array. For cosmetic reasons I'd like to change this to something else, e.g. invalid or inactive. My string array can be up to

Re: [Numpy-discussion] replacing Nan's in a string array converted from a float array

2009-05-07 Thread Brennan Williams
Charles R Harris wrote: On Thu, May 7, 2009 at 5:36 PM, Brennan Williams brennan.willi...@visualreservoir.com mailto:brennan.willi...@visualreservoir.com wrote: I've created an array of strings using something like stringarray=self.karray.astype(|S8

[Numpy-discussion] recommendations on goodness of fit functions?

2009-04-13 Thread Brennan Williams
Hi numpy/scipy users, I'm looking to add some basic goodness-of-fit functions/plots to my app. I have a set of simulated y vs time data and a set of observed y vs time data. The time values aren't always the same, i.e. there are often fewer observed data points. Some variables will be in a

Re: [Numpy-discussion] recommendations on goodness of fit functions?

2009-04-13 Thread Brennan Williams
Charles R Harris wrote: On Mon, Apr 13, 2009 at 6:28 PM, Brennan Williams brennan.willi...@visualreservoir.com mailto:brennan.willi...@visualreservoir.com wrote: Hi numpy/scipy users, I'm looking to add some basic goodness-of-fit functions/plots to my app. I have a set

Re: [Numpy-discussion] trying to speed up the following....

2009-03-25 Thread Brennan Williams
Robert Kern wrote: On Wed, Mar 25, 2009 at 00:09, Brennan Williams brennan.willi...@visualreservoir.com wrote: Robert Kern wrote: On Tue, Mar 24, 2009 at 18:29, Brennan Williams brennan.willi...@visualreservoir.com wrote: I have an array (porvatt.yarray) of ni*nj*nk values

[Numpy-discussion] trying to speed up the following....

2009-03-24 Thread Brennan Williams
I have an array (porvatt.yarray) of ni*nj*nk values. I want to create two further arrays. activeatt.yarray is of size ni*nj*nk and is a pointer array to an active cell number. If a cell is inactive then its activeatt.yarray value will be 0 ijkatt.yarray is of size nactive, the number of active

Re: [Numpy-discussion] trying to speed up the following....

2009-03-24 Thread Brennan Williams
Robert Kern wrote: On Tue, Mar 24, 2009 at 18:29, Brennan Williams brennan.willi...@visualreservoir.com wrote: I have an array (porvatt.yarray) of ni*nj*nk values. I want to create two further arrays. activeatt.yarray is of size ni*nj*nk and is a pointer array to an active cell number

[Numpy-discussion] populating an array

2009-03-02 Thread Brennan Williams
Ok... I'm using Traits and numpy. I have a 3D grid with directions I,J and K. I have NI,NJ,NK cells in the I,J,K directions so I have NI*NJ*NK cells overall. I have data arrays with a value for each cell in the grid. I'm going to store this as a 1D array, i.e. 1ncells where ncells=NI*NJ*NK

Re: [Numpy-discussion] astype

2009-02-14 Thread Brennan Williams
Nils Wagner wrote: On Sat, 14 Feb 2009 17:22:43 +0100 Nils Wagner nwag...@iam.uni-stuttgart.de wrote: Hi all, How can I convert an array with string elements to an array with float entries ? coord_info[:,1] array(['0,0', '100,0', '200,0', '300,0', '400,0',

Re: [Numpy-discussion] checksum on numpy float array

2008-12-06 Thread Brennan Williams
OK so maybe I should (1) not add some sort of checksum type functionality to my read/write methods these read/write methods simply read/write numpy arrays to a binary file which contains one or more numpy arrays (and nothing else). (2) replace my binary files iwith either HDF5 or

[Numpy-discussion] checksum on numpy float array

2008-12-04 Thread Brennan Williams
My app reads in one or more float arrays from a binary file. Sometimes due to network timeouts etc the array is not read correctly. What would be the best way of checking the validity of the data? Would some sort of checksum approach be a good idea? Would that work with an array of floating

Re: [Numpy-discussion] checksum on numpy float array

2008-12-04 Thread Brennan Williams
[EMAIL PROTECTED] wrote: On Thu, Dec 4, 2008 at 6:17 PM, Brennan Williams [EMAIL PROTECTED] wrote: My app reads in one or more float arrays from a binary file. Sometimes due to network timeouts etc the array is not read correctly. What would be the best way of checking the validity

Re: [Numpy-discussion] checksum on numpy float array

2008-12-04 Thread Brennan Williams
Thanks [EMAIL PROTECTED] wrote: I didn't check what this does behind the scenes, but try this import hashlib #standard python library import numpy as np m = hashlib.md5() m.update(np.array(range(100))) m.update(np.array(range(200))) m2 = hashlib.md5() m2.update(np.array(range(100)))

Re: [Numpy-discussion] checksum on numpy float array

2008-12-04 Thread Brennan Williams
Robert Kern wrote: On Thu, Dec 4, 2008 at 18:54, Brennan Williams [EMAIL PROTECTED] wrote: Thanks [EMAIL PROTECTED] wrote: I didn't check what this does behind the scenes, but try this import hashlib #standard python library import numpy as np m = hashlib.md5