Re: [Numpy-discussion] fast access and normalizing of ndarray slices

2012-05-31 Thread Wolfgang Kerzendorf
-31, at 1:43 AM, Val Kalatsky wrote: What do you mean by normalized it? Could you give the output of your procedure for the sample input data. Val On Thu, May 31, 2012 at 12:36 AM, Wolfgang Kerzendorf wkerzend...@gmail.com wrote: Dear all, I have an ndarray which consists of many arrays

[Numpy-discussion] fast access and normalizing of ndarray slices

2012-05-30 Thread Wolfgang Kerzendorf
Dear all, I have an ndarray which consists of many arrays stacked behind each other (only conceptually, in truth it's a normal 1d float64 array). I have a second array which tells me the start of the individual data sets in the 1d float64 array and another one which tells me the length.

[Numpy-discussion] sparse array data

2012-05-02 Thread Wolfgang Kerzendorf
Hi all, I'm currently writing a code that needs three dimensional data (for the physicists it's dimensions are atom, ion, level). The problem is that not all combinations do exist (a sparse array). Sparse matrices in scipy only deal with two dimensions. The operations that I need to do on

[Numpy-discussion] reading in files with fixed with format

2011-07-07 Thread Wolfgang Kerzendorf
Dear all, I have a couple of data files that were written with fortran at a fixed with. That means its tabular data which might not have spaces (it is just specified how many characters each field has and what type it is). Is there anything to read that with scipy and or numpy? Cheers

Re: [Numpy-discussion] reading in files with fixed with format

2011-07-07 Thread Wolfgang Kerzendorf
: http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html#the-delimiter-argument Miguel On Thu, Jul 07, 2011 at 09:51:28AM +0200, Wolfgang Kerzendorf wrote: Dear all, I have a couple of data files that were written with fortran at a fixed with. That means its tabular data which might

[Numpy-discussion] random numbers from arbitrary distribution

2011-07-07 Thread Wolfgang Kerzendorf
Hi all, Is there an way to get random numbers from an arbitrary distribution already built-in to numpy. I am interested to do that for a black body distribution Thanks Wolfgang ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

[Numpy-discussion] weird TypeError: only length-1 arrays can be converted to Python scalars

2011-05-25 Thread Wolfgang Kerzendorf
Dear all, I have come across a weird error, in which the traceback doesn't really reflect the problem (ah osx 10.6.7, python2.6, np 1.6, sp 0.9, ipython 0.10.1, mpl 1.0.1): File weird_error.py, line 8, in module fmin.simplex() File

[Numpy-discussion] fitting legendre polynomial

2011-05-17 Thread Wolfgang Kerzendorf
Hello, The science package I'm using fits legendre polynomials to data. I heard it is more stable than the normal polynomials for a fit. Is there a polyfit for legendre polynomials? How do I do that with the new legendre polynomials module? Thanks Wolfgang

[Numpy-discussion] Grid indexing

2011-02-26 Thread Wolfgang Kerzendorf
Hello, I have a n dimensional grid. The grids axes are linear but not intergers. Let's say I want the value in gridcell [3.2,-5.6,0.01]. Is there an easy way to transform the index? Do I have to write my own class to accomplish this. Is there an easy way in numpy to accomplish this. Can I

[Numpy-discussion] using sunperf for compiling scipy and numpy

2010-03-22 Thread Wolfgang Kerzendorf
Dear all, I would like to use the sunperf libraries when compiling scipy and numpy. I tried using setupscons.py which seems to check from SUNPERF libraries, but it didnt recognize where mine are: here is a listing of /pkg/linux/SS12/sunstudio12.1 (thats where the sunperf library lives):

[Numpy-discussion] Multithreading support

2010-02-13 Thread Wolfgang Kerzendorf
Dear all, I don't know much about parallel programming so I don't know how easy it is to do that: When doing simple arrray operations like adding two arrays or adding a number to the array, is numpy able to put this on multiple cores? I have tried it but it doesnt seem to do that. Is there a

Re: [Numpy-discussion] snow leopard issues with numpy

2009-09-04 Thread Wolfgang Kerzendorf
Dear all, A recompile of matplotlib (Svn) did the trick. Thanks for the help. I had issues with building scipy and numpy and Robert Kern helped me a lot there. I think it would be useful in general if numpy and scipy recommend compilers for OS X (perhaps on the download page for numpy and

[Numpy-discussion] snow leopard issues with numpy

2009-09-03 Thread Wolfgang Kerzendorf
I just installed numpy and scipy (both svn) on OS X 10.6 and just got scipy to work with Robert Kern's help. Playing around with numpy I got the following segfault: http://pastebin.com/m35220dbf I hope someone can make sense of it. Thanks in advance Wolfgang

Re: [Numpy-discussion] snow leopard issues with numpy

2009-09-03 Thread Wolfgang Kerzendorf
my version of python is the one that comes with snow leopard: 2.6.1 hope that helps On 03/09/2009, at 18:13 , Charles R Harris wrote: On Thu, Sep 3, 2009 at 10:02 AM, Wolfgang Kerzendorf wkerzend...@googlemail.com wrote: I just installed numpy and scipy (both svn) on OS X 10.6 and just