[Numpy-discussion] np.linalg.lstsq with several columns all 0 => huge x ?

2012-10-24 Thread denis
bug, not worth looking into. linalg.svd is ok though, odd. Summary: if you run linalg.lstsq on big arrays, either check max |x| or regularize, do lstsq( vstack( A, weight * eye(dim) ), hstack( b, zeros(dim) )) cheers -- de

Re: [Numpy-discussion] np.linalg.lstsq with several columns all 0 => huge x ?

2012-10-25 Thread denis
On 24/10/2012 19:59, josef.p...@gmail.com wrote: > On Wed, Oct 24, 2012 at 1:33 PM, denis wrote: >> Folks, >> np.linalg.lstsq of a random-uniform A 50 x 32 with 3 columns all 0 >> returns x[:3] 0 as expected, >> but 4 columns all 0 => huge x: > lstsq

[Numpy-discussion] install numpy 1.6.2 .dmg on macosx 10.7, check for python 2.7

2012-11-29 Thread denis
t 3)] How is the code in the .dmg checking for python.org python ? Thanks, cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] install numpy 1.6.2 .dmg on macosx 10.7, check for python 2.7

2012-11-29 Thread denis
d matplotlib .dmg s too) cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] On the difference of two positive definite matrices

2012-12-17 Thread denis
how to do that, but "note that this is no longer an orthogonal diagonalization"; orthogonal can do it iff A and B commute. cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] np.where: x and y need to have the same shape as condition ?

2013-01-29 Thread denis
ot;where is equivalent to ..." ? Thanks, cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] faster Array.take( floatindices.astype(int) ) ?

2013-02-01 Thread denis
Folks, is there a way to speed up Array.take( floatindices.astype(int) ) ? astype(int) makes a copy, floor() returns floats. (Is there a wiki of NumPy one-liners / various tricks ? would sure beat googling.) Thanks, cheers -- denis ___ NumPy

Re: [Numpy-discussion] faster Array.take( floatindices.astype(int) ) ?

2013-02-03 Thread denis
ely cast to required type cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Repeated dot products

2010-01-07 Thread denis
aultdict import numpy as np __version__ = "2010 7jan denis" def pairs( s, Len=2 ): """ repeated non-overlapping pairs (substrings, subwords) "abracadabra" -> ab ra [[0 7] [2 9]], not br Len=3: triples, 4 ... """

Re: [Numpy-discussion] Behaviour of vdot(array2d, array1d)

2010-01-10 Thread denis
to log a ticket -- experts please advise ? cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy1.4 dtype issues: scipy.stats & pytables

2010-01-11 Thread denis
cipy.sparse.linalg.dsolve', DeprecationWarning) scipy.stats error numpy.dtype does not appear to be the correct type object cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy1.4 dtype issues: scipy.stats & pytables

2010-01-12 Thread denis
import scipy.stats then works. Similarly import scipy.cluster => trace File "numpy.pxd", line 30, in scipy.spatial.ckdtree (scipy/spatial/ckdtree.c:6087) ValueError: numpy.dtype does not appear to be the correct type object I like the naming convention xx_cython.so. cheers --

Re: [Numpy-discussion] numpy1.4 dtype issues: scipy.stats & pytables

2010-01-13 Thread denis
em in the process; I realize that testing is hard work, no glory.) cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Module Index for numpy?

2010-01-25 Thread denis
existing GUIs and desiderata, sort by sum(features) / time-to-write-a-manual (not time-to-hack). Or, o'er forms of doc let fools contest, what's best written is the best. cheers -- denis ___ NumPy-Discussion mailing list NumP

Re: [Numpy-discussion] incremental histogram

2010-05-04 Thread denis
le / smooth: must exist, physicists ? - adaptive binning, e.g. percentiles then uniform - interpolate: fill holes, then *linear or spline += data is nice, but seems orthogonal to histogramming -- why not just subclass histogram ? cheers -- denis __

Re: [Numpy-discussion] incremental histogram

2010-05-04 Thread denis
On 04/05/2010 14:09, Neal Becker wrote: > denis wrote: >> Neal, >> I like the idea of a faster np.histogram / histogramdd; >> but it would have to be compatible with numpy and pylab >> or at least a clear, documented subset (doc first). > > The poin

Re: [Numpy-discussion] Slicing slower than matrix multiplication?

2009-12-16 Thread denis
dots = np.vstack([ dot( x[j:j+4] .T, imatrix ) .T for j in ...]) cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] [AstroPy] Rotating and Transforming Vectors--Flight Path of a Celestial Body

2009-12-18 Thread denis
(dot = inner ? math. ?)) but has a clean api. @Anne, excellent description; can you find time to work up your notes to a say 5-page intro ? Would sell like hotcakes cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] addition, multiplication of a polynomial and np.{float, int}

2012-03-06 Thread Denis Laxalde
t64(1) + p array([2, 2]) >>> np.int(1) + p poly1d([1, 2]) >>> np.int64(1)*p array([1, 1]) What's happening here? I'd expect operations with polynomials would return a polynomial. -- Denis ___ NumPy-Dis

[Numpy-discussion] adaptive interpolation on a regular 2d grid

2009-08-22 Thread denis bzowy
Folks, here's a simple adaptive interpolator; drop me a line to chat about it adalin2( func, near, nx=300, ny=150, xstep=32, ystep=16, xrange=(0,1), yrange=(0,1), dtype=np.float, norm=abs ) Purpose: interpolate a function on a regular 2d grid: take func() where it changes ra

[Numpy-discussion] a[j, k], clipping j k to the edge if they're 1 off ?

2009-08-28 Thread denis bzowy
in(max(j, 0), m-1), min(max(k, 0), n-1)] This works but is both ugly and 5* slower than plain a[j][k]. Is there a better way ? (Sorry if this is a duplicate, must come up often.) cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@s

Re: [Numpy-discussion] adaptive interpolation on a regular 2d grid

2009-09-02 Thread denis bzowy
Robert Kern gmail.com> writes: > Looks good! Where can we get the code? Can this be specialized for 1D functions? Re code: sure, I'll be happy to post it if anyone points me to a real test case or two, to help me understand the envelope -- 100^2 -> 500^2 grid ? (Splines on regular grids are fa

Re: [Numpy-discussion] adaptive interpolation on a regular 2d grid

2009-09-04 Thread denis bzowy
Robert Kern gmail.com> writes: > http://svn.scipy.org/svn/scikits/trunk/delaunay/scikits/delaunay/testfuncs.py Thank you Robert, that looks nice. I've put 1d adalin1.py in http://drop.io/denis_adalin ; have 2d, but can someone please comment on {content, style, direction} of this simple 1d (150 l

[Numpy-discussion] greppable file of all numpy functions ?

2009-09-07 Thread denis bzowy
Does anyone have a program to generate a file with one line per Numpy function / class / method, for local grepping ? It might be useful for any package with thousands of functions too. (Grepping a Pypi summary to see "what the heck is ..." takes < 1 second.) Sorry if this is a duplicate, must exi

Re: [Numpy-discussion] greppable file of all numpy functions ?

2009-09-08 Thread denis bzowy
denis bzowy t-online.de> writes: > > Does anyone have a program to generate a file with one line per Numpy function > / class / method, for local grepping ? Sorry I wasn't clear: I want just all defs, one per long line, like this: ... PyQt4.QtCore.QObject.findChildren(type typ

[Numpy-discussion] timeit one big vs many little a[ogrid] = f(ogrid)

2009-09-14 Thread denis bzowy
Folks, this simple timeit -> a largish speed ratio that surprised me -- but perhaps I've done something stupid ? """ timeit one big vs many little a[ogrid] = f(ogrid) Consider evaluating a function on an NxN grid, in 2 ways: a) in one shot: y,x = ogrid[0:N, 0:N] a[y,x] = f(x,y) b) piece

Re: [Numpy-discussion] timeit one big vs many little a[ogrid] = f(ogrid)

2009-09-15 Thread denis bzowy
Added: an inline grid y,x = np.ogrid[ j:j+n, k:k+n ] a[ j:j+n, k:k+n ] = f(x,y) is 3* faster than a[y,x] = f(x,y) for 256x256, about the same for little 8x8 squares (on mac ppc.) So ogrids are not "objects" -- you can't g = xxgrid[j:j+n, k:k+n] ... use g, pass it just like i

Re: [Numpy-discussion] numpy macosx10.5 binaries: compa tible with 10.4?

2009-09-30 Thread denis bzowy
> Russell E. Owen wrote: > > All the official numpy 1.3.0 Mac binaries are labelled "macosx10.5". > > Does anyone know if these are backwards compatible with MacOS X 10.4 numpy-1.3.0-py2.5-macosx10.5.dmg works fine on macosx 10.4.11 ppc (wit

Re: [Numpy-discussion] Convert data into rectangular grid

2009-09-30 Thread denis bzowy
jah gmail.com> writes: > > Hi,Suppose I have a set of x,y,c data ... matplotlib.pyplot.contour() ). > JAH, is griddata() working and fast enough for you ? How many points are you contouring ? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy

Re: [Numpy-discussion] Convert data into rectangular grid

2009-10-05 Thread denis bzowy
jah gmail.com> writes: > Thanks all.  Robert, griddata is exactly what I was looking for.  David, I think that should work too.  And Denis, griddata is sufficiently fast that I am not complaining---contouring about 1e6 or 1e7 points typically. > Fyinfo, take a look at http://yt.enzo

[Numpy-discussion] numpy-discussion in google groups ?

2009-10-05 Thread denis bzowy
er do experts use ? cheers -- denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Repeated dot products

2009-12-12 Thread Denis Laxalde
Le samedi 12 décembre 2009 à 01:55 -0800, T J a écrit : > Is there a better way? You may have a look at http://scipy.org/Cookbook/MultiDot Several alternatives are proposed. Cheers, -- Denis ___ NumPy-Discussion mailing list NumPy-Discuss

[Numpy-discussion] gcc not g++ for build numpy on mac 10.4 ?

2008-01-16 Thread denis bzowy
Folks,   numpy/scipy builds on my mac 10.4.9 exec g++ not gcc but g++ assumes c++ even for .c files => lts of errors. I changed the link /usr/bin/g++ --> gcc, must be a better way ? Seems to me that g++ on numpy C is a bug: numpy builds on macs should run either   gcc or   g++ -x c 

Re: [Numpy-discussion] appveyor CI

2015-03-05 Thread Denis-Alexander Engemann
Same for MNE-Python: https://github.com/mne-tools/mne-python/blob/master/appveyor.yml Denis 2015-03-05 20:42 GMT+01:00 Stefan van der Walt : > Hi Chuck > > On 2015-03-05 10:09:08, Charles R Harris > wrote: > > Anyone familiar with appveyor <http://www.appveyor.com/>?