Re: [Numpy-discussion] how to name "contagious" keyword in np.ma.convolve

2016-10-16 Thread Hanno Klemm
> On 16 Oct 2016, at 03:21, Allan Haldane wrote: > >> On 10/14/2016 07:49 PM, Juan Nunez-Iglesias wrote: >> +1 for propagate_mask. That is the only proposal that immediately makes >> sense to me. "contagious" may be cute but I think approximately 0% of >> users would guess its purpose on first

Re: [Numpy-discussion] Advanced indexing: "fancy" vs. orthogonal

2015-04-02 Thread Hanno Klemm
> On 03 Apr 2015, at 00:04, Colin J. Williams wrote: > > > > On 02-Apr-15 4:35 PM, Eric Firing wrote: >> On 2015/04/02 10:22 AM, josef.p...@gmail.com wrote: >>> Swapping the axis when slices are mixed with fancy indexing was a >>> design mistake, IMO. But not fancy indexing itself. >> I'm not

Re: [Numpy-discussion] 3D array and the right hand rule

2015-03-17 Thread Hanno Klemm
> On 17 Mar 2015, at 09:11, Dieter Van Eessen > wrote: > > Hello, > > Sorry to disturb again, but the topic still bugs me somehow... > I'll try to rephrase the question: > > - What's the influence of the type of N-array representation with respect to > TENSOR-calculus? > - Are multiple repre

Re: [Numpy-discussion] Error message

2015-03-14 Thread Hanno Klemm
> On 14.03.2015, at 10:57, Danny Kramer wrote: > > Hi, > I am getting the following error message: > > C:\Python27\lib\site-packages\numpy\lib\npyio.py:819: UserWarning: loadtxt: > Empty input file: "[]" > warnings.warn('loadtxt: Empty input file: "%s"' % fname) > main loop list assignment

Re: [Numpy-discussion] how to do scoring of random point to avoid overlapping in python

2013-10-18 Thread Hanno Klemm
On 18.10.2013 12:33, Pooja Gupta wrote: > I have generated random point around a object and then evaluate each > random point on certain criteria. But problem is that every time I am > getting new point. How i can resolve this problem so that my result > should be uniform. Is any way to evaluate th

Re: [Numpy-discussion] Question regarding documentation of structured arrays

2013-07-24 Thread Hanno Klemm
Hi Stefan, I would be happy to file a pull request against the docs if you (or somebody) could point me to a document on how and where to do that. Hanno On 24.07.2013 12:31, Stéfan van der Walt wrote: > Hi Hanno > > On Wed, Jul 24, 2013 at 11:46 AM, Hanno Klemm > wrote: &g

[Numpy-discussion] Question regarding documentation of structured arrays

2013-07-24 Thread Hanno Klemm
Hi, I found the following inconsistency between the advertised and the actual behviour of structured arrays: on http://docs.scipy.org/doc/numpy/user/basics.rec.html it says in the section "Accessing multiple fields at once" Notice that the fields are always returned in the same order regardle

Re: [Numpy-discussion] Unable to building numpy with openblas using bento or distutils

2013-03-23 Thread Hanno Klemm
Skipper, this looks like a problem that I had in the bad old days with ATLAS, as well. Try compiling openblas with the -fPIC flag that used to help. Best of luck, Hanno hanno.kl...@me.com Sent from my mobile device, please excuse my brevity. On 23.03.2013, at 19:19, Skipper Seabold wrote:

Re: [Numpy-discussion] return index of maximum value in an array easily?

2013-01-10 Thread Hanno Klemm
ue-in-pythons-numpy > > ___ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion -- Hanno Klemm kl...@phys.ethz.ch ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Meta: help, devel and stackoverflow

2012-06-28 Thread Hanno Klemm
Am 28.06.2012 um 23:07 schrieb Matthew Brett: > Hi, > > On Thu, Jun 28, 2012 at 1:42 PM, srean wrote: >> In case this changes your mind (or assuages fears) just wanted to >> point out that many open source projects do this. It is not about >> claiming that one is more important than the other, n

Re: [Numpy-discussion] solving linear equations

2012-03-09 Thread Hanno Klemm
Hi, have a look at scipy optimize. For a solution with only positive values you could consider using scipy.optimize.nnls, if you want more general (linear) constraints, have a look at the linear programming functions. Another possibility would be looking at openOpt, which has probably more g

Re: [Numpy-discussion] Data cube optimization for combination

2012-03-06 Thread Hanno Klemm
Hi, this should work: import numpy as np ndim = 20 cube = np.random.rand(32,ndim, ndim) result = np.zeros([ndim, ndim], np.float32) def combine(cube, result): for ii in range(ndim): for jj in range(ndim): result[ii, jj] = np.sqrt((cube[:,ii, jj])).sum() return

Re: [Numpy-discussion] einsum

2011-01-26 Thread Hanno Klemm
Am 27.01.2011 um 00:29 schrieb Mark Wiebe: On Wed, Jan 26, 2011 at 3:18 PM, Hanno Klemm wrote: Mark, interesting idea. Given the fact that in 2-d euclidean metric, the Einstein summation conventions are only a way to write out conventional matrix multiplications, do you consider at some

Re: [Numpy-discussion] einsum

2011-01-26 Thread Hanno Klemm
Mark, interesting idea. Given the fact that in 2-d euclidean metric, the Einstein summation conventions are only a way to write out conventional matrix multiplications, do you consider at some point to include a non-euclidean metric in this thing? (As you have in special relativity, for e

[Numpy-discussion] Slicing and structured arrays question

2009-01-27 Thread Hanno Klemm
Hi, I have the following question, that I could not find an answer to in the example list, or by googling: I have a record array with dtype such as: dtype([('times', 'http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Efficient removal of duplicates

2008-12-16 Thread Hanno Klemm
; prevents the Delaunay triangulation algorithm from completing its >> task. >> >> Question, is there an efficent way, of getting rid of the duplicate >> entries? >> All I can think of involves loops. >> >> Thanks and regards, >> Hanno > > __

[Numpy-discussion] Efficient removal of duplicates

2008-12-15 Thread Hanno Klemm
? All I can think of involves loops. Thanks and regards, Hanno -- Hanno Klemm kl...@phys.ethz.ch ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Problem with correlate?

2008-08-22 Thread Hanno Klemm
N.array([1.,0,0,0,0,0,0]) >>> N.correlate(x,y2, mode='full') array([ 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.]) >>> N.__version__ '1.1.1' >>> Best regards, Hanno Stéfan van der Walt <[EMAIL PROTECTED]> said: > Hi Hanno > >

Re: [Numpy-discussion] Problem with correlate?

2008-08-22 Thread Hanno Klemm
-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > Content-Disposition: inline > > 2008/8/20 Hanno Klemm <[EMAIL PROTECTED]>: > > In [29]: x =3D array([0.,0.,1, 0, 0]) > > In [35]: y1 =3D array([1,0,0,0,0]) > > > > In [36]: cor

[Numpy-discussion] Problem with correlate?

2008-08-20 Thread Hanno Klemm
y help would be appreciated, the numpy version is 1.0.4. Best regards, Hanno -- Hanno Klemm [EMAIL PROTECTED] ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] PyTables, array and recarray

2008-06-02 Thread Hanno Klemm
that with ndarrays, or is there? Cheers, Hanno Francesc Alted <[EMAIL PROTECTED]> said: > A Friday 30 May 2008, Hanno Klemm escrigué: > > Hi, > > > > I try to save the contents of a numpy recarray with PyTables into a > > file. That works well, however, if I

[Numpy-discussion] PyTables, array and recarray

2008-05-30 Thread Hanno Klemm
escription := { "id": Int32Col(shape=(), dflt=0, pos=0), "x": Float64Col(shape=(), dflt=0.0, pos=1), "y": Float64Col(shape=(), dflt=0.0, pos=2)} byteorder := 'little' chunkshape := (409,) >>> f.close() >>> f = t.openFile('test.h5',

[Numpy-discussion] Unexpected behaviour by in place addition of array and masked array

2008-04-24 Thread Hanno Klemm
e=1e+20) >>> a+=b >>> a array([[ 1., 2., 3.], [ 0., 3., 0.], [ 4., 5., 6.]]) >>> N.__version__ '1.0.4' >>> Best regards, Hanno -- Hanno Klemm [EMAIL PROTECTED] ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] NumPy/SciPy LAPACK version

2007-07-16 Thread Hanno Klemm
.88353492 +4.13682075e-08j, 5.3595916  -2.06841037e-08j],   [ > 3.8064764  +1.03420519e-08j,  5.3595916  -2.06841037e-08j, 6.9127068  +1.03420519e-08j]])>>> sqrtm(a)*sqrtm(a)array([[ 25.08487289 +1.03595922e-07j,  19.42586452 -1.82329475e-07j, > 14.48926259 +7.87335527e-08j

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-26 Thread Hanno Klemm
Didrik, thanks, I'll definitely will have a look at this. Hanno Didrik Pinte <[EMAIL PROTECTED]> said: > > --=-aUNlfGW7wc8MzGzdSDGo > Content-Type: text/plain > Content-Transfer-Encoding: quoted-printable > > On Mon, 2007-06-25 at 23:09 +0200, Hanno Klemm wr

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-25 Thread Hanno Klemm
I will try and dig a bit more in the literature, maybe I find something. Hanno On Jun 25, 2007, at 4:59 PM, Timothy Hochberg wrote: > > > > On 6/25/07, Hanno Klemm < [EMAIL PROTECTED]> wrote: >> Tim, >> >> Thank you very much, the code does what's it e

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-25 Thread Hanno Klemm
max(i*binsize, 1) > j1 = min(j0+binsize, n) > denominator = 0 > for j in range(j0, j1): > d2 = (data[...,j:] - data[...,:-j])**2 > result[i] += d2.sum() > denominator += N.prod(d2.shape) > resu

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-22 Thread Hanno Klemm
hberg <[EMAIL PROTECTED]> said: > --=_Part_157389_1558912.1182523880067 > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > Content-Transfer-Encoding: 7bit > Content-Disposition: inline > > On 6/22/07, Hanno Klemm <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > >

[Numpy-discussion] effectively computing variograms with numpy

2007-06-22 Thread Hanno Klemm
Hi, I have an array which represents regularly spaced spatial data. I now would like to compute the (semi-)variogram, i.e. gamma(h) = 1/N(h) \sum_{i,j\in N(h)} (z_i - z_j)**2, where h is the (approximate) spatial difference between the measurements z_i, and z_j, and N(h) is the number of measur

Re: [Numpy-discussion] numpy and freeze.py

2007-05-23 Thread Hanno Klemm
changes are in > the svn. So, I don't think this is an issue that has arisen due to the > changes unless you have checked numpy out recently and compiled it > yourself. > > MJ > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Be

[Numpy-discussion] numpy and freeze.py

2007-05-22 Thread Hanno Klemm
/proj/yot04/apps/python2.5/lib/python2.5/site-packages/numpy/core/__init__.py", line 5, in import multiarray ImportError: No module named multiarray Am I doing something wrong? Or does freeze.py not work with numpy? Hanno -- Hanno Klemm [EMAIL PROTECTED] ___

[Numpy-discussion] FFT definition

2007-02-05 Thread Hanno Klemm
rom [0,1,...,n/2-1,-n/2,...-1] Is this inconsistent or am I missing something here? Hanno -- Hanno Klemm [EMAIL PROTECTED] ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion