Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
On Tue, Aug 4, 2009 at 5:28 PM, David Cournapeauda...@ar.media.kyoto-u.ac.jp wrote: No, I think you and Matthew actually found a bug in recent changes I have done in distutils. I will fix it right away, Ok, not right away, but could you check that r7280 fixed it for you ? cheers, David

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
David Cournapeau cournape at gmail.com writes: On Tue, Aug 4, 2009 at 5:28 PM, David Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote: No, I think you and Matthew actually found a bug in recent changes I have done in distutils. I will fix it right away, Ok, not right away, but could

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
Dave dave.hirschfeld at gmail.com writes: Work's for me. -Dave Except now when trying to compile the latest scipy I get the following error: C:\dev\src\scipysvn up Fetching external item into 'doc\sphinxext' External at revision 7280. At revision 5890. C:\dev\src\scipypython setup.py

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
Dave wrote: Dave dave.hirschfeld at gmail.com writes: Work's for me. -Dave Except now when trying to compile the latest scipy I get the following error: Was numpy installed from a bdist_wininst installer, or did you use the install method directly ? David

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
David Cournapeau david at ar.media.kyoto-u.ac.jp writes: Dave wrote: Dave dave.hirschfeld at gmail.com writes: Work's for me. -Dave Except now when trying to compile the latest scipy I get the following error: Was numpy installed from a bdist_wininst

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
Dave wrote: David Cournapeau david at ar.media.kyoto-u.ac.jp writes: Dave wrote: Dave dave.hirschfeld at gmail.com writes: Work's for me. -Dave Except now when trying to compile the latest scipy I get the following error:

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
On Tue, Aug 4, 2009 at 8:13 PM, David Cournapeauda...@ar.media.kyoto-u.ac.jp wrote: I think I understand the problem. Unfortunately, that's looks tricky to solve... I hate distutils. Ok - should be fixed in r7281. David ___ NumPy-Discussion mailing

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
David Cournapeau cournape at gmail.com writes: On Tue, Aug 4, 2009 at 8:13 PM, David Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote: I think I understand the problem. Unfortunately, that's looks tricky to solve... I hate distutils. Ok - should be fixed in r7281. David Well,

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Charles R Harris
On Tue, Aug 4, 2009 at 10:51 AM, Dave dave.hirschf...@gmail.com wrote: David Cournapeau cournape at gmail.com writes: On Tue, Aug 4, 2009 at 8:13 PM, David Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote: I think I understand the problem. Unfortunately, that's looks tricky to

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Matthew Brett
Hi, On Tue, Aug 4, 2009 at 9:31 AM, David Cournapeaucourn...@gmail.com wrote: On Tue, Aug 4, 2009 at 8:13 PM, David Cournapeauda...@ar.media.kyoto-u.ac.jp wrote: I think I understand the problem. Unfortunately, that's looks tricky to solve... I hate distutils. Ok - should be fixed in

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Robert Kern
On Tue, Aug 4, 2009 at 15:09, Matthew Brettmatthew.br...@gmail.com wrote:  File /home/mb312/usr/local/lib/python2.5/site-packages/numpy/distutils/command/build_ext.py, line 74, in run    self.library_dirs.append(build_clib.build_clib) UnboundLocalError: local variable 'build_clib'

[Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-03 Thread Matthew Brett
Hi, We are using numpy.distutils, and have run into this odd behavior in windows: I have XP, Mingw, latest numpy SVN, python.org python 2.6. All the commands below I am running from within the 'numpy' root directory (where 'numpy' is a subdirectory). If I run python setup.py build I get the

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-03 Thread David Cournapeau
Matthew Brett wrote: Hi, We are using numpy.distutils, and have run into this odd behavior in windows: I have XP, Mingw, latest numpy SVN, python.org python 2.6. All the commands below I am running from within the 'numpy' root directory (where 'numpy' is a subdirectory). If I run

[Numpy-discussion] Is this a bug?

2009-07-31 Thread Chris Colbert
Numpy 1.3 In [1]: import numpy as np In [2]: a = np.zeros(5).fill(5) In [3]: a In [4]: type(a) Out[4]: type 'NoneType' In [5]: a = np.zeros(5) In [6]: a.fill(5) In [7]: a Out[7]: array([ 5., 5., 5., 5., 5.]) What i'm trying to do may not be the best way, but I think it should still

Re: [Numpy-discussion] Is this a bug?

2009-07-31 Thread Robert Kern
On Fri, Jul 31, 2009 at 17:15, Chris Colbertsccolb...@gmail.com wrote: Numpy 1.3 In [1]: import numpy as np In [2]: a = np.zeros(5).fill(5) In [3]: a In [4]: type(a) Out[4]: type 'NoneType' In [5]: a = np.zeros(5) In [6]: a.fill(5) In [7]: a Out[7]: array([ 5.,  5.,  5.,  5.,  

Re: [Numpy-discussion] Is this a bug?

2009-07-31 Thread Chris Colbert
ahh, yeah I see now. Thanks! nothing like making myself look the fool on a friday! Cheers! On Fri, Jul 31, 2009 at 6:20 PM, Robert Kernrobert.k...@gmail.com wrote: On Fri, Jul 31, 2009 at 17:15, Chris Colbertsccolb...@gmail.com wrote: Numpy 1.3 In [1]: import numpy as np In [2]: a =

Re: [Numpy-discussion] Is this a bug?

2009-07-31 Thread Charles R Harris
On Fri, Jul 31, 2009 at 4:30 PM, Chris Colbert sccolb...@gmail.com wrote: ahh, yeah I see now. Thanks! nothing like making myself look the fool on a friday! If you have to choose a day, Friday is the day of choice. Or a least it supposedly works that way for bad news and politics. Chuck

Re: [Numpy-discussion] Is this a bug?

2009-07-31 Thread Ian Mallett
Awww, it's fun to be foolish on Fridays! ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] is it a bug?

2009-03-13 Thread Stéfan van der Walt
Hey Travis! 2009/3/13 Travis E. Oliphant oliph...@enthought.com: Referencing my previous post on this topic.   In this case, it is unambiguous to replace dimensions 1 and 2 with the result of broadcasting idx and idx together.   Thus the (5,6) dimensions is replaced by the (2,) result of

Re: [Numpy-discussion] is it a bug?

2009-03-13 Thread Vincent Schut
Travis E. Oliphant wrote: shuwj5...@163.com wrote: snipsnip Travis, thanks for the excellent explanation! It clears something which I think is related to this, I've been wanting to ask on the ml for some time already. Now here's the case. I often have 4d arrays that are actually related sets

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread Stéfan van der Walt
2009/3/12 Robert Kern robert.k...@gmail.com: idx = np.array([0,1]) e = x[0,:,idx] print e.shape #- return (2,3). I think the right answer should be (3,2). Is #       it a bug here? my numpy version is 1.2.1. It's certainly weird, but it's working as designed. Fancy indexing via arrays

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread shuwj5...@163.com
On Wed, Mar 11, 2009 at 19:55, shuwj5...@163.com shuwj5...@163.com wrote: Hi, import numpy as np x = np.arange(30) x.shape = (2,3,5) idx = np.array([0,1]) e = x[0,idx,:] print e.shape # return (2,5). ok. idx = np.array([0,1]) e = x[0,:,idx] print e.shape

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread Robert Kern
On Thu, Mar 12, 2009 at 01:34, Stéfan van der Walt ste...@sun.ac.za wrote: 2009/3/12 Robert Kern robert.k...@gmail.com: idx = np.array([0,1]) e = x[0,:,idx] print e.shape #- return (2,3). I think the right answer should be (3,2). Is #       it a bug here? my numpy version is 1.2.1.

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread Travis E. Oliphant
shuwj5...@163.com wrote: It's certainly weird, but it's working as designed. Fancy indexing via arrays is a separate subsystem from indexing via slices. Basically, fancy indexing decides the outermost shape of the result (e.g. the leftmost items in the shape tuple). If there are any sliced

Re: [Numpy-discussion] is it a bug?

2009-03-12 Thread Travis E. Oliphant
Robert Kern wrote: On Thu, Mar 12, 2009 at 01:34, Stéfan van der Walt ste...@sun.ac.za wrote: 2009/3/12 Robert Kern robert.k...@gmail.com: idx = np.array([0,1]) e = x[0,:,idx] print e.shape #- return (2,3). I think the right answer should be (3,2). Is # it a bug here?

[Numpy-discussion] is it a bug?

2009-03-11 Thread shuwj5...@163.com
Hi, import numpy as np x = np.arange(30) x.shape = (2,3,5) idx = np.array([0,1]) e = x[0,idx,:] print e.shape # return (2,5). ok. idx = np.array([0,1]) e = x[0,:,idx] print e.shape #- return (2,3). I think the right answer should be (3,2). Is # it a bug here? my

Re: [Numpy-discussion] is it a bug?

2009-03-11 Thread Jonathan Taylor
You lost me on x = np.arange(30) x.shape = (2,3,5) For me I get: In [2]: x = np.arange(30) In [3]: x.shape Out[3]: (30,) which is what I would expect. Perhaps I missed something? Jon. On Wed, Mar 11, 2009 at 8:55 PM, shuwj5...@163.com shuwj5...@163.com wrote: Hi, import numpy as np x

Re: [Numpy-discussion] is it a bug?

2009-03-11 Thread Robert Kern
On Wed, Mar 11, 2009 at 21:51, Jonathan Taylor jonathan.tay...@utoronto.ca wrote: You lost me on x = np.arange(30) x.shape = (2,3,5) For me I get: In [2]: x = np.arange(30) In [3]: x.shape Out[3]: (30,) which is what I would expect.   Perhaps I missed something? He is reshaping x by

Re: [Numpy-discussion] is it a bug?

2009-03-11 Thread josef . pktd
On Wed, Mar 11, 2009 at 9:51 PM, Jonathan Taylor jonathan.tay...@utoronto.ca wrote: You lost me on x = np.arange(30) x.shape = (2,3,5) For me I get: In [2]: x = np.arange(30) In [3]: x.shape Out[3]: (30,) which is what I would expect.   Perhaps I missed something? Jon. - Show quoted

Re: [Numpy-discussion] is it a bug?

2009-03-11 Thread Robert Kern
On Wed, Mar 11, 2009 at 19:55, shuwj5...@163.com shuwj5...@163.com wrote: Hi, import numpy as np x = np.arange(30) x.shape = (2,3,5) idx = np.array([0,1]) e = x[0,idx,:] print e.shape # return (2,5). ok. idx = np.array([0,1]) e = x[0,:,idx] print e.shape #- return (2,3). I

Re: [Numpy-discussion] Numpy array flags - BUG?

2008-09-12 Thread Thomas Hrabe
Thank you, first tests work. Thomas Travis E. Oliphant wrote: Thomas Hrabe wrote: Hello everyone, I must report odd behaviour of the numpy arrays regarding the flags set for each array object in C++. Please have a look at the following code: static PyObject* test(PyObject*

[Numpy-discussion] Numpy array flags - BUG?

2008-09-11 Thread Thomas Hrabe
Hello everyone, I must report odd behaviour of the numpy arrays regarding the flags set for each array object in C++. Please have a look at the following code: static PyObject* test(PyObject* self,PyObject* args){ int s[2]; s[0] = 1; s[1] = 1; char* value =

Re: [Numpy-discussion] Numpy array flags - BUG?

2008-09-11 Thread Thomas Hrabe
I tried another approach, creating an array in python with import numpy; a = numpy.zeros((2,2),order=C); a.flags.num 1285 and setting the flags within C++ to 1286. The value remains the same (1285) after setting it to 1286 in embedded C. PyArg_ParseTuple(args, O!,PyArray_Type, array)

Re: [Numpy-discussion] Numpy array flags - BUG?

2008-09-11 Thread Travis E. Oliphant
Thomas Hrabe wrote: Hello everyone, I must report odd behaviour of the numpy arrays regarding the flags set for each array object in C++. Please have a look at the following code: static PyObject* test(PyObject* self,PyObject* args){ int s[2]; s[0] = 1; s[1] = 1;

[Numpy-discussion] floating point char - bug?

2008-08-31 Thread Christian K.
Hi, I just came across somethin I never noticed before. I cannot say whether this is due to an update of numpy but it is possible - I am running 1.1.1 on __german__ windows. Here is the observation: a = N.linspace(0,1,5) a array([ 0. , 0.25, 0.5 , 0.75, 1. ]) a.astype(float) array([ 0.

Re: [Numpy-discussion] floating point char - bug?

2008-08-31 Thread Charles R Harris
On Sun, Aug 31, 2008 at 1:14 PM, Christian K. [EMAIL PROTECTED] wrote: Hi, I just came across somethin I never noticed before. I cannot say whether this is due to an update of numpy but it is possible - I am running 1.1.1 on __german__ windows. Here is the observation: a =

Re: [Numpy-discussion] floating point char - bug?

2008-08-31 Thread Christian K.
Charles R Harris schrieb: On Sun, Aug 31, 2008 at 1:14 PM, Christian K. [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I just came across somethin I never noticed before. I cannot say whether this is due to an update of numpy but it is possible - I am running

[Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread dmitrey
hi all, isn't it a bug (latest numpy from svn, as well as my older version) from numpy import array print array((1,2,3)).fill(10) None Regards, D. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] isn't it a bug in array.fill()

2008-08-29 Thread dmitrey
sorry, it isn't a bug, it's my fault, fill() returns None and do in-place modification. D. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread Keith Goodman
On Fri, Aug 29, 2008 at 10:19 AM, dmitrey [EMAIL PROTECTED] wrote: hi all, isn't it a bug (latest numpy from svn, as well as my older version) from numpy import array print array((1,2,3)).fill(10) None Yeah, I do stuff like that too. fill works in place so it returns None. x =

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread dmitrey
Keith Goodman wrote: Yeah, I do stuff like that too. fill works in place so it returns None. x = np.array([1,2]) x.fill(10) x array([10, 10]) x = x.fill(10) # -- Danger! print x None Since result None is never used it would be better to return reference

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread Keith Goodman
On Fri, Aug 29, 2008 at 10:42 AM, dmitrey [EMAIL PROTECTED] wrote: Keith Goodman wrote: Yeah, I do stuff like that too. fill works in place so it returns None. x = np.array([1,2]) x.fill(10) x array([10, 10]) x = x.fill(10) # -- Danger! print x None Since result None is never

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread Keith Goodman
On Fri, Aug 29, 2008 at 10:51 AM, Keith Goodman [EMAIL PROTECTED] wrote: On Fri, Aug 29, 2008 at 10:42 AM, dmitrey [EMAIL PROTECTED] wrote: Keith Goodman wrote: Yeah, I do stuff like that too. fill works in place so it returns None. x = np.array([1,2]) x.fill(10) x array([10, 10])

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread Charles R Harris
On Fri, Aug 29, 2008 at 11:51 AM, Keith Goodman [EMAIL PROTECTED] wrote: On Fri, Aug 29, 2008 at 10:42 AM, dmitrey [EMAIL PROTECTED] wrote: Keith Goodman wrote: Yeah, I do stuff like that too. fill works in place so it returns None. x = np.array([1,2]) x.fill(10) x

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread Alan G Isaac
I suppose all the discussion on comp.lang.python about list methods (especially sort) is becoming relevant to this thread. Cheers, Alan Isaac ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread Stéfan van der Walt
2008/8/29 Charles R Harris [EMAIL PROTECTED]: I like that idea. A lot of numpy functions return a reference to the modified array when the output array (out) is specified. Google up the various discussions of python sort to see why Guido doesn't like that sort of thing. We've had that

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread Alan G Isaac
Stéfan van der Walt wrote: At first, I also thought it might be more intuitive to return the output array, but then I realised that it would make it more difficult to realise that the operation is being performed in-place. Maybe it is good to remind programmers of what happens under the

Re: [Numpy-discussion] isn't it a bug in array.fill()?

2008-08-29 Thread Charles R Harris
On Fri, Aug 29, 2008 at 3:03 PM, Alan G Isaac [EMAIL PROTECTED] wrote: Stéfan van der Walt wrote: At first, I also thought it might be more intuitive to return the output array, but then I realised that it would make it more difficult to realise that the operation is being performed

Re: [Numpy-discussion] Is this a bug?

2008-05-30 Thread Travis E. Oliphant
Robert Kern wrote: On Wed, May 28, 2008 at 7:52 PM, Travis E. Oliphant [EMAIL PROTECTED] wrote: Anne Archibald wrote: 2008/5/27 Robert Kern [EMAIL PROTECTED]: Can we make it so that dtype('c') is preserved instead of displaying '|S1'? It does not behave the same as

Re: [Numpy-discussion] Is this a bug?

2008-05-28 Thread Anne Archibald
2008/5/27 Robert Kern [EMAIL PROTECTED]: Can we make it so that dtype('c') is preserved instead of displaying '|S1'? It does not behave the same as dtype('|S1') although it compares equal to it. It seems alarming to me that they should compare equal but behave differently. Is it possible to

Re: [Numpy-discussion] Is this a bug?

2008-05-28 Thread Travis E. Oliphant
Anne Archibald wrote: 2008/5/27 Robert Kern [EMAIL PROTECTED]: Can we make it so that dtype('c') is preserved instead of displaying '|S1'? It does not behave the same as dtype('|S1') although it compares equal to it. It seems alarming to me that they should compare equal but

Re: [Numpy-discussion] Is this a bug?

2008-05-28 Thread Robert Kern
On Wed, May 28, 2008 at 7:52 PM, Travis E. Oliphant [EMAIL PROTECTED] wrote: Anne Archibald wrote: 2008/5/27 Robert Kern [EMAIL PROTECTED]: Can we make it so that dtype('c') is preserved instead of displaying '|S1'? It does not behave the same as dtype('|S1') although it compares equal to

Re: [Numpy-discussion] Is this a bug?

2008-05-27 Thread Travis E. Oliphant
Charles R Harris wrote: I vaguely recall this generated an array from all the characters. In [1]: array('123', dtype='c') Out[1]: array('1', dtype='|S1') This may be a bug. import Numeric Numeric.array('123','c') array([1, 2, 3],'c') My memory of the point of 'c' was to mimic

Re: [Numpy-discussion] Is this a bug?

2008-05-27 Thread Charles R Harris
On Tue, May 27, 2008 at 1:31 PM, Travis E. Oliphant [EMAIL PROTECTED] wrote: Charles R Harris wrote: I vaguely recall this generated an array from all the characters. In [1]: array('123', dtype='c') Out[1]: array('1', dtype='|S1') This may be a bug. import Numeric

Re: [Numpy-discussion] Is this a bug?

2008-05-27 Thread Travis E. Oliphant
Charles R Harris wrote: On Tue, May 27, 2008 at 1:31 PM, Travis E. Oliphant [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Charles R Harris wrote: I vaguely recall this generated an array from all the characters. In [1]: array('123', dtype='c') Out[1]:

Re: [Numpy-discussion] Is this a bug?

2008-05-27 Thread Robert Kern
On Tue, May 27, 2008 at 3:15 PM, Travis E. Oliphant [EMAIL PROTECTED] wrote: Charles R Harris wrote: On Tue, May 27, 2008 at 1:31 PM, Travis E. Oliphant [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Charles R Harris wrote: I vaguely recall this generated an array from all the

Re: [Numpy-discussion] Is this a bug?

2008-05-27 Thread Travis E. Oliphant
Robert Kern wrote: Can we make it so that dtype('c') is preserved instead of displaying '|S1'? It does not behave the same as dtype('|S1') although it compares equal to it. We could with some special-casing in the representation for string data-types. Right now, dtype('c') is

[Numpy-discussion] Unable to file bug

2008-03-19 Thread Neal Becker
http://scipy.org/scipy/numpy/newticket#preview is giving me: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and

[Numpy-discussion] isn't it a bug? (matrix multiplication)

2008-02-07 Thread dmitrey
from numpy import array a = array((1.0, 2.0)) b = c = 15 b = b*a#ok c *= a#ok d = array(15) e = array(15) d = d*a#this works ok e *= a#this intended to be same as prev line, but yields error: Traceback (innermost last): File stdin, line 1, in module ValueError: invalid return array shape

Re: [Numpy-discussion] isn't it a bug? (matrix multiplication)

2008-02-07 Thread Christopher Barker
Alan G Isaac wrote: On Thu, 07 Feb 2008, dmitrey apparently wrote: a = array((1.0, 2.0)) e = array(15) e *= a # ... yields error: You are trying to stuff in two values where you have only allocated space for 1. Exactly. but to expound a bit more: The ?= operators are in-place operators

Re: [Numpy-discussion] [numpy-discussion] searchsorted bug

2008-01-31 Thread James Philbin
Hi, OK, i'm using: In [6]: numpy.__version__ Out[6]: '1.0.3' Should I try the development version? Which version of numpy would people generally recommend? James ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

[Numpy-discussion] [numpy-discussion] searchsorted bug

2008-01-31 Thread James Philbin
Hi, The following gives the wrong answer: In [2]: A = array(['a','aa','b']) In [3]: B = array(['d','e']) In [4]: A.searchsorted(B) Out[4]: array([3, 0]) 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

[Numpy-discussion] [f2py] mailing lists, bug, and .f2py_f2cmap, Oh My!

2007-11-07 Thread Peter Schmitt
Hi, I have one short question, a possible bug report, and one longer question: 1. (short question) Which mailing list is appropriate for f2py discussion: numpy-discussion or f2py-users? 2. (bug report?) I'm using numpy from svn (revision 4410). When using f2py to compile, I got an error

[Numpy-discussion] Is this a bug?

2007-09-16 Thread Charles R Harris
I note a small inconsistency in the use of the out keyword in some functions: a=array(0) sometrue([1],out=a).shape () a=array([0]) sometrue([1],out=a).shape (1,) a=array([[0]]) sometrue([1],out=a).shape (1, 1) a=array([[0,0]]) sometrue(eye(2),axis=1,out=a).shape (1, 2) It seems to me

[Numpy-discussion] Bugfix for numpy.info bug

2007-06-19 Thread Fernando Perez
Bug === In [8]: N.info(N.ones(3)) class: ndarray shape: (3,) strides: (8,) itemsize: 8 aligned: True contiguous: True fortran: True --- TypeError Traceback (most recent call last)

Re: [Numpy-discussion] Bugfix for numpy.info bug

2007-06-19 Thread Robert Kern
Fernando Perez wrote: Question any objection if I commit this? Since I don't really touch the codebase often, I'd rather ask the real core people. I also don't know if it's really the right thing to do, I just tabbed into the object and picked what seemed to be the most

[Numpy-discussion] weird numpy.any() behavior; bug, or 6-legged feature?

2007-01-16 Thread Matthew Koichi Grimes
Numpy's any() function gives unintuitive results when given a generator rather than a sequence: import numpy as N N.any( i 0 for i in range(3) ) True If the generator is instead given as a list (using a list comprehension), then the expected answer is given: N.any( [i 0 for i in range(3)]

Re: [Numpy-discussion] weird numpy.any() behavior; bug, or 6-legged feature?

2007-01-16 Thread Robert Kern
Matthew Koichi Grimes wrote: Is this a bug? It seems like having to generate a whole list before calling any() defeats the whole appeal of using any() in the first place; namely that it'll exit on the first False returned by the generator, without going through the rest of the elements. No,

<    1   2