[Numpy-discussion] Runtime Warning by numpy.divide(0.0, 0.0) can't be ignored

2013-09-23 Thread Lorenzo Di Gregorio
rn', 'over': 'warn', 'under': 'ignore'} numpy.divide(1.0,0.0) Out[1]: inf numpy.divide(0.0,0.0) Out[1]: nan I could not find information on Google: is this a known problem? Is there a way to suppress this warning? I'm working on a 64b Win7 m

Re: [Numpy-discussion] which one is best?

2008-09-19 Thread lorenzo
On Fri, Sep 19, 2008 at 2:50 PM, Arnar Flatberg <[EMAIL PROTECTED]>wrote: > > > I think > [x*y for x in a for y in b] > feels pythonic, however it has a surprisingly lousy performance. > > This returns a len(x)*len(y) long list, which is not what you want. This two methods seem equivalent: In [1

Re: [Numpy-discussion] loadtxt and N/A

2008-07-13 Thread Lorenzo Bolla
you can use the 'converters' keyword in numpy.loadtxt. first define a function to convert a string in a float, that can handle your 'N/A' entries: def converter(x): if x == 'N/A': return numpy.nan else: return float(x) then use: >>> numpy.loadtxt('test.dat', converters={1

Re: [Numpy-discussion] loadtxt and usecols

2008-07-12 Thread Lorenzo Bolla
why not using: data = loadtxt('18B180.dat', skiprows = 1, usecols = xrange(1,46)) obviously, you need to know how many columns you have. hth, L. On Sat, Jul 12, 2008 at 10:07:06AM -0400, Bryan Fodness wrote: > i would like to load my data without knowing the length, i have explicitly > stated the

Re: [Numpy-discussion] Combination of element-wise and matrix multiplication

2008-07-04 Thread lorenzo bolla
If a and b are 2d arrays, you can use numpy.dot: In [36]: a Out[36]: array([[1, 2], [3, 4]]) In [37]: b Out[37]: array([[5, 6], [7, 8]]) In [38]: numpy.dot(a,b) Out[38]: array([[19, 22], [43, 50]]) If a and b are 3d arrays of shape 2x2xN, you can use something like that: In [

[Numpy-discussion] bvp on 64 bits machine

2008-06-04 Thread lorenzo bolla
roblem is cause by the fact that _N.int_ is different for 32 and 64 bits machines. Forcing it to be an _N.int32 did the trick. Pauli, would you like to commit it to your source distribution? Regards, Lorenzo. -- "Whereof one cannot speak, thereof one mu

Re: [Numpy-discussion] insert 1D to a 2D array and change it to 3D

2008-04-25 Thread lorenzo bolla
l instances of an array into another one. > > Matthieu > -- > French PhD student > Website : http://matthieu-brucher.developpez.com/ > Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 > LinkedIn : http://www.linkedin.com/

Re: [Numpy-discussion] Fromfunction generalization

2008-04-22 Thread lorenzo bolla
__ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/ ___

[Numpy-discussion] different behaviour in asfarray(None)

2008-04-22 Thread lorenzo bolla
I noticed a change in the behaviour of numpy.asfarray between numpy version 1.0.5 and 1.1.0: 1.0.5 In [3]: numpy.asfarray(None) Out[3]: array(nan) In [4]: numpy.__version__ Out[4]: '1.0.5.dev4455' 1.1.0 In [16]: numpy.asfarray(None)

[Numpy-discussion] Numpy 1.1.0 and matplotlib 0.90.1

2008-04-22 Thread lorenzo bolla
Hello, the latest svn numpy version 1.1.0.dev5061 does not work with matplotlib 0.90.1 (version shipped with enthought distribution), unless a change in Python25/Lib/site-packages/matplotlib-0.90.1.0003-py2.5-win32.egg/matplotlib/numerix/ma/__init__.py is done: $ diff __init__.py.orig __init__.py

Re: [Numpy-discussion] linalg.eigh() newbie doubt

2008-03-31 Thread lorenzo bolla
; thanks > gordon > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/

Re: [Numpy-discussion] greedy loadtxt

2008-03-27 Thread lorenzo bolla
t; of the table. L. On Thu, Mar 27, 2008 at 7:59 PM, Christopher Barker <[EMAIL PROTECTED]> wrote: > Alan G Isaac wrote: > > I believe Robert fixed this; > > update from the SVN repository. > > lorenzo bolla wrote: > > Should I use numpy.fromfile, instead? >

[Numpy-discussion] greedy loadtxt

2008-03-27 Thread lorenzo bolla
3 In [33]: numpy.loadtxt('data.txt') Out[33]: array([ 1., 2., 3.]) Should I use numpy.fromfile, instead? L. -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/ ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http:

Re: [Numpy-discussion] Quikest way to create a diagonal matrix ?

2008-03-26 Thread lorenzo bolla
) 1 loops, best of 3: 76.8 us per loop L. On Wed, Mar 26, 2008 at 4:21 PM, Joris De Ridder < [EMAIL PROTECTED]> wrote: > > On 26 Mar 2008, at 15:36, lorenzo bolla wrote: > > > numpy.tri > > > > In [31]: T = numpy.tri(m) > > > > In [32]: z.T * T

Re: [Numpy-discussion] Quikest way to create a diagonal matrix ?

2008-03-26 Thread lorenzo bolla
t > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/ ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] new question - summing a list of arrays

2008-03-18 Thread lorenzo bolla
gt; Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/ ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] arccosh for complex numbers, goofy choice of branch

2008-03-17 Thread lorenzo bolla
py-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > > -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/ ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Read array from file

2008-03-14 Thread lorenzo bolla
me, but I haven't figure any nicer way. > Could you tell me if what I am doing looks reasonanble or if there are any > other solutions? > Do I really need to initiallize coords? > > Thanks in advance, > Dimitrios > > ___ > Nump

Re: [Numpy-discussion] searchsorted bug

2008-01-31 Thread lorenzo bolla
1 (r251:54863, Oct 30 2007, 13:54:11) > [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2 > > >>> import numpy > >>> A = numpy.array(['a','aa','b']) > >>> B = numpy.array(['d','e']) > >>> A.searchsort

Re: [Numpy-discussion] searchsorted bug

2008-01-31 Thread lorenzo bolla
> B = numpy.array(['d','e']) > >>> A.searchsorted(B) > array([3, 0]) > >>> > > > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/ ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] searchsorted bug

2008-01-31 Thread lorenzo bolla
the webpage? > > James > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/

Re: [Numpy-discussion] searchsorted bug

2008-01-31 Thread lorenzo bolla
The answer should be [3,3]. I've come across this while trying to come > up with an ismember function which works for strings (setmember1d > doesn't seems to assume numerical arrays). > > Thanks, > James > ___ > Numpy-

Re: [Numpy-discussion] Can not update a submatrix

2008-01-30 Thread lorenzo bolla
or you can maybe use numpy.ix_: ax = [1,2] R[numpy.ix_(ax,ax)] = 100 hth, L. On 1/30/08, lorenzo bolla <[EMAIL PROTECTED]> wrote: > > you simply need to change the definition of ax: > ax = slice(1,3) > > and all works fine. > L. > > On 1/30/08, Francesc A

Re: [Numpy-discussion] Can not update a submatrix

2008-01-30 Thread lorenzo bolla
9).reshape(3,3) > In [69]: S = R[1:3,:][:,1:3] > In [70]: S[:] = 2 > In [71]: R > Out[71]: > array([[0, 1, 2], > [3, 2, 2], > [6, 2, 2]]) > > Cheers, > > -- > >0,0< Francesc Altet http://www.carabos.com/ > V V Cárabos Co

Re: [Numpy-discussion] difference numpy/matlab

2008-01-29 Thread lorenzo bolla
I'd rather say "arbitrary". On 1/29/08, Neal Becker <[EMAIL PROTECTED]> wrote: > > lorenzo bolla wrote: > > > I noticed that: > > > > min([1+1j,-1+3j]) > > > > gives 1+1j in matlab (where for complex, min(abs) is used) >

[Numpy-discussion] difference numpy/matlab

2008-01-29 Thread lorenzo bolla
I noticed that: min([1+1j,-1+3j]) gives 1+1j in matlab (where for complex, min(abs) is used) but gives -1+3j in numpy (where lexicographic order is used) shouldn't this be mentioned somewhere in "Numpy for Matlab users" webpage? -- Lorenzo Bolla [EMAIL

[Numpy-discussion] tensordot and axes argument

2008-01-28 Thread lorenzo bolla
Shouldn't the "axes" argument in tensordot be named "axis"? L. -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/ ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Failing to understand vectorize behavior

2008-01-09 Thread lorenzo bolla
Yes, 32 bits. On a 64 bits machine, I get 8 characters long strings like you. L. On 1/9/08, David Huard <[EMAIL PROTECTED]> wrote: > > Lorenzo, > > 2008/1/9, lorenzo bolla <[EMAIL PROTECTED]>: > > > > I don't think it's expected: mine are cropp

Re: [Numpy-discussion] Failing to understand vectorize behavior

2008-01-09 Thread lorenzo bolla
aa ' , ' bb ', ' > cc '] > >>> vstrip(s) > array(['', '', ''], > dtype='|S8') > > where all strings are cropped to 8 characters.

Re: [Numpy-discussion] Bugs using complex192

2008-01-07 Thread lorenzo bolla
It doesn't work on Windows, either. In [35]: numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex192)) Out[35]: array([0.0+2.9996087e-305j], dtype=complex192) In [36]: numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex128)) Out[36]: array([ 0.+1.j]) In [37]: numpy.__version__ Out[37]: '1.0.5.dev45

Re: [Numpy-discussion] matrix multipln takes too much time

2007-12-25 Thread lorenzo bolla
you can either use matrix multiplication (see resultmatrix2) or tensordot (see resultmatrix3). on my computer I have: 1.15.6 sec with your code 2.0.072 sec with resultmatrix2 3.0.040 sec with tensordot (resultmatrix3) (-- which is a 400x speed) -

Re: [Numpy-discussion] setting items in a matrix

2007-12-21 Thread lorenzo bolla
or, you can either use fill. In [53]: M = numpy.matrix(numpy.zeros((3,5))) In [55]: M.fill(999) In [56]: M Out[56]: matrix([[ 999., 999., 999., 999., 999.], [ 999., 999., 999., 999., 999.], [ 999., 999., 999., 999., 999.]]) L. On 12/21/07, [EMAIL PROTECTED] <[EMAIL PR

Re: [Numpy-discussion] where construct

2007-12-16 Thread lorenzo bolla
use '+' instead of 'or' for bool arrays. In [8]: numpy.where((a<1) + (b<3), b, c) Out[8]: array([4, 2, 2, 1]) hth, L. On Dec 16, 2007 8:10 PM, Ross Harder <[EMAIL PROTECTED]> wrote: > > What's the correct way to do something like this? > > a=array( (0,1,1,0) ) > b=array( (4,3,2,1) ) > c=array(

Re: [Numpy-discussion] numpy : your experiences?

2007-11-20 Thread lorenzo bolla
braries like blas, lapack, fftw, umfpack, arpack > and so on (which are mainly written in Fortran/C). > > > c) Do you use any form of parallel processing? Multicores? SMPs? > > Clusters? If yes how did u utilize them? > > > I use MPI (mpi4py) on a shared memory multiproce

Re: [Numpy-discussion] Casting a float array into a string array

2007-10-05 Thread lorenzo bolla
Matthieu Brucher <[EMAIL PROTECTED]> wrote: > > I'd like to have the '2.', because if the number is negative, only '-' is > returned, not the real value. > > Matthieu > > 2007/10/5, lorenzo bolla < [EMAIL PROTECTED]>: > > > > wha

Re: [Numpy-discussion] Casting a float array into a string array

2007-10-05 Thread lorenzo bolla
what's wrong with astype? In [3]: x = numpy.array([[2.,3.],[4.,5.]]) In [4]: x.astype(str) Out[4]: array([['2', '3'], ['4', '5']], dtype='|S1') and if you want a list: In [5]: x.astype(str).tolist() Out[5]: [['2', '3'], ['4', '5']] L. On 10/5/07, Matthieu Brucher <[EMAIL PROTEC

Re: [Numpy-discussion] howto convert float array to array of integers

2007-10-05 Thread lorenzo bolla
what about astype? a.astype(t) -> Copy of array cast to type t. Cast array m to type t. t can be either a string representing a typecode, or a python type object of type int, float, or complex. L. On 10/5/07, dmitrey <[EMAIL PROTECTED]> wrote: > > hi all, > I have an array like > arra

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread lorenzo bolla
this is really annoying. Matlab handles the "ceil" weirdness quite well, though. -- >> ceil(0.6/0.1) ans = 6 >> ceil((0.4+0.2)/0.1) ans = 7 >> 0:0.1:0.6 ans = 01.000e-001 2.0

Re: [Numpy-discussion] Vector magnitude?

2007-09-05 Thread lorenzo bolla
maybe numpy.vdot is good for you. In [3]: x = numpy.random.rand(4) In [4]: x Out[4]: array([ 0.45426898, 0.22369238, 0.98731244, 0.7758774 ]) In [5]: numpy.sqrt(numpy.vdot(x,x)) Out[5]: 1.35394615117 hth, lorenzo On 9/5/07, Robert Dailey <[EMAIL PROTECTED]> wrote: > > Oh I th

Re: [Numpy-discussion] numpy installation problem

2007-08-08 Thread lorenzo bolla
sorry for the silly question: have you done "python setup.py install" from the numpy src directory, after untarring? then cd out from the src directory and try to import numpy from python. L. On 7/31/07, kingshuk ghosh <[EMAIL PROTECTED]> wrote: > > Hi, > I downloaded numpy1.0.3-2.tar and unzippe

[Numpy-discussion] expm

2007-07-20 Thread lorenzo bolla
hi all. is there a function in numpy to compute the exp of a matrix, similar to expm in matlab? for example: expm([[0,0],[0,0]]) = eye(2) thanks, lorenzo. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman

[Numpy-discussion] f2py and openmp

2007-07-05 Thread lorenzo bolla
e, is setting the enviroment variable OMP_NUM_THREADS to the desired value. using os.environ to set it from python does not seem to work: the function is always executed using 4 processors (that is quite strange in itself: where does "4" comes from?). any hints? thank you all in a

[Numpy-discussion] f2py and type construct

2007-06-18 Thread lorenzo bolla
t.py", line 994, in run_command cmd_obj.run() [...] KeyError: 'void' Exit 1 module basic gives no problems, but module basic2 yes, because of the type construct. it seems that f2py doesn't support "type" construct. am I right? is there a workaround? thank you very much, lorenzo. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] f2py and type construct

2007-06-15 Thread lorenzo bolla
py/rules.py", line 1130, in buildmodule mr,wrap = f90mod_rules.buildhooks(m) File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/site-packages/numpy/f2py/f90mod_rules.py", line 127, in buildhooks at = capi_maps.c2capi_map[ct] KeyError: 'void' Exit 1 module basic gives no problems, but module basic2 yes, because of the type construct. what am I doing wrong? thank you very much, lorenzo. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] fortran representation

2007-05-31 Thread lorenzo bolla
[ 4., 5., 4., 5.], [ 6., 5., 6., 7.]], dtype=float32) How can I do that? (I know I could do data.reshape(4,3).T, but it's not very "elegant" and reshaping in ND becomes a mess!). (I tried with numpy.array(data, order = 'Fotran'

[Numpy-discussion] IEEE floating point arithmetics

2007-05-26 Thread lorenzo bolla
Hi all. I have to work with floating point arithmetics and I found a module called "double module" (http://symptotic.com/mj/double/public/double-module.html) that does what I'd like. Basically, I would like to find the nearest smaller and bigger floating point numbers, given a "real" real number (

Re: [Numpy-discussion] f2py and C functions/subroutines/structs

2007-05-24 Thread lorenzo bolla
would... any hints? thank you! L. On 5/24/07, Pierre GM <[EMAIL PROTECTED]> wrote: Lorenzo, you can indeed use f2py to write extensions around some C code: http://cens.ioc.ee/projects/f2py2e/usersguide/index.html http://www.scipy.org/Cookbook/f2py_and_NumPy I think you should also b

[Numpy-discussion] f2py and C functions/subroutines/structs

2007-05-24 Thread lorenzo bolla
t? Or giving me a good tutorial to read? I found only very few information on www.scipy.org. Thank you in advance, Lorenzo. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] BLAS and LAPACK used?

2007-05-17 Thread lorenzo bolla
Hi all, I need to know the libraries (BLAS and LAPACK) which numpy has been linked to, when I compiled it. I can't remember which ones I used (ATLAS, MKL, etc...)... Is there an easy way to find it out? Thanks in advance, Lorenzo Bolla. ___

Re: [Numpy-discussion] arctan2 with complex args

2007-04-30 Thread lorenzo bolla
hold on, david. the formula I posted previously from wolfram is ArcTan[x,y] with x or y complex: its the same of arctan2(x,y). arctan is another function (even though arctan2(y,x) should be "a better" arctan(y/x)). the correct formula for y = arctan(x), with any x (real or complex), should be (if

Re: [Numpy-discussion] can't import repmat from numpy

2007-04-30 Thread lorenzo bolla
it looks like repmat is not there anymore... why? use numpy.repeat and numpy.tile, instead! hth, lorenzo. On 4/30/07, dmitrey <[EMAIL PROTECTED]> wrote: What's wrong? start python shell; from numpy import sin => all ok from numpy import repmat => Traceback (most recent c

Re: [Numpy-discussion] arctan2 with complex args

2007-04-30 Thread lorenzo bolla
me! I have two cases. 1. I need that arctan2(1+0.0001j,1-0.01j) gives something close to arctan2(1,1): any decent analytic prolungation will do! 2. if someone of you is familiar with electromagnetic problems, in particular with Snell's law, will recognize that in case of total i

Re: [Numpy-discussion] arctan2 with complex args

2007-04-29 Thread lorenzo bolla
You make your point, but I would expect a behaviour similar to Mathematica or Matlab. From http://documents.wolfram.com/mathematica/functions/ArcTan "If x or y is complex, then ArcTan[x, y] gives . When , ArcTan[x, y] gives the number such that and ." Lorenzo. On 4/29/07, David

[Numpy-discussion] arctan2 with complex args

2007-04-29 Thread lorenzo bolla
ave:8> atan2(1j,1j) ans = 0 octave:9> atan2(1j,1) ans = 0 octave:10> atan2(1,1j) ans = 1.5708 bug or wanted behaviour? Lorenzo. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Problem with roots and complex coefficients

2007-04-19 Thread lorenzo bolla
updated. now it works. many thanks. L. On 4/19/07, Nils Wagner <[EMAIL PROTECTED]> wrote: lorenzo bolla wrote: > dear all, > I've some problems with numpy.roots. > take a look at the following code: > > > import numpy

[Numpy-discussion] Problem with roots and complex coefficients

2007-04-19 Thread lorenzo bolla
return res 70 elif len(s)==2: TypeError: can't convert complex to float; use abs(z) any ideas? thanks, Lorenzo ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] NumPy benchmark

2007-04-18 Thread lorenzo bolla
your numbers, I can tell that compiling numpy with gcc or icc makes no big difference. Am I correct? If yes, let me know if I can add this info to the scipy wiki: I'm preparing an extention to this page http://www.scipy.org/PerformancePython. cheers, lorenzo On 4/17/07, rex <[EMAIL

Re: [Numpy-discussion] NumPy benchmark

2007-04-17 Thread lorenzo bolla
as soon as you do it, I'd like to compare them with the benchmarks I posted here few days ago (compiled with gcc): http://lbolla.wordpress.com/2007/04/11/numerical-computing-matlab-vs-pythonnumpyweave/ lorenzo. On 4/17/07, rex <[EMAIL PROTECTED]> wrote: I'm about to build num

Re: [Numpy-discussion] efficient norm of a vector

2007-03-14 Thread lorenzo bolla
thanks. I hadn't seen it. anyway, from very rough benchmarks I did, the quickest and easiest way of computing the euclidean norm of a 1D array is: n = sqrt(dot(x,x.conj())) much faster than: n = sqrt(sum(abs(x)**2)) and much much faster than: n = scipy.linalg.norm(x) regards, lorenzo. On

[Numpy-discussion] efficient norm of a vector

2007-03-13 Thread lorenzo bolla
Hi all, just a quick (and easy?) question. what is the best (fastest) way to implement the euclidean norm of a vector, i.e. the function: import scipy as S def norm(x): """normalize a vector.""" return S.sqrt(S.sum(S.absolute(x)**2))

[Numpy-discussion] Python EM Project

2007-01-10 Thread lorenzo bolla
emed to be "responsible" for the project, cannot be contacted via e-mail. Thank you! Lorenzo ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] reduction

2007-01-08 Thread lorenzo bolla
ops. I did it, too. should I delete it?? how?? thanks! On 1/8/07, Charles R Harris <[EMAIL PROTECTED]> wrote: On 1/8/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > On 1/8/07, lorenzo bolla < [EMAIL PROTECTED]> wrote: > > > > Well, I don

Re: [Numpy-discussion] reduction

2007-01-08 Thread lorenzo bolla
oh, I forgot. It happens with "divide", too. lorenzo. On 1/8/07, Charles R Harris <[EMAIL PROTECTED]> wrote: On 1/8/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > > On 1/8/07, lorenzo bolla < [EMAIL PROTECTED]> wrote: > > > &g

Re: [Numpy-discussion] reduction

2007-01-08 Thread lorenzo bolla
Well, I don't know if we should consider it a bug, but it definetely behaves not as expected by the standard "reduce", right? I'm very happy to help: just tell me how to "file a ticket"! (what does it mean, by the way?). thanks! lorenzo. On 1/8/07, Charles R Ha

[Numpy-discussion] reduction

2007-01-08 Thread lorenzo bolla
dd, x) # 6, as expected add.reduce(x) # 6, as expected def mysub(x,y): # re-define the binary diff function return x - y reduce(mysub, x)# -6, as expected subtract.reduce(x)# 2 ---> WHY? Can someone explain me this? Thank you in advance!