Re: [Numpy-discussion] corrcoef

2007-09-06 Thread Sven Schreiber
John Hunter schrieb: Is it desirable that numpy.corrcoef for two arrays returns a 2x2 array rather than a scalar In [10]: npy.corrcoef(npy.random.rand(10), npy.random.rand(10)) Out[10]: array([[ 1., -0.16088728], [-0.16088728, 1.]]) I always end up extracting

Re: [Numpy-discussion] What is an empty matrix ?

2007-07-05 Thread Sven Schreiber
David Cournapeau schrieb: Well, I think nobody argues that scipy function should crash whatever input you give :). The problem is more how to treat them. For example, using numpy.linalg.pinv crashes numpy right now, det and fft do not work, and norm returns 0. This is seems inconcistent to

Re: [Numpy-discussion] Is this an indexing bug?

2007-06-20 Thread Sven Schreiber
Travis Oliphant schrieb: Sturla Molden wrote: x = numpy.arange(100).reshape((1,10,10)) x[0,:,numpy.arange(5)].shape (5, 10) x[:,:,numpy.arange(5)].shape (1, 10, 5) It looks like a bug that needs to be squashed. These are both correct. See my previous posts about the rule.

Re: [Numpy-discussion] Is this an indexing bug?

2007-06-19 Thread Sven Schreiber
Sven Schreiber schrieb: Tom K. schrieb: h = zeros((1, 4, 100)) h[0,:,arange(14)].shape (14, 4) After reading section 3.4.2.1 of the numpy book, I also still don't expect this result. So if it's not a bug, I'd be glad if some expert could explain why not. To be more specific, I would

Re: [Numpy-discussion] Is this an indexing bug?

2007-06-19 Thread Sven Schreiber
Sturla Molden schrieb: x = numpy.arange(100).reshape((1,10,10)) x[0,:,numpy.arange(5)].shape (5, 10) x[:,:,numpy.arange(5)].shape (1, 10, 5) It looks like a bug that needs to be squashed. S.M. And you already had me convinced ;-) I'm still curious which one's the bug and

Re: [Numpy-discussion] VMWare Virtual Appliance of Ubuntu with numpy, scipy, matplotlib, and ipython available

2007-06-11 Thread Sven Schreiber
Alex schrieb: I run VMWare Player and it works fine - easy to setup and easy to setup a Matlab replacement. I only wonder how to transfer files between the Windows XP and the Ubuntu VM? Apart from using usb sticks (AFAIK VMware still has issues with usb 2.0 though) I think the experts usually

Re: [Numpy-discussion] complex arrays and ctypes

2007-05-28 Thread Sven Schreiber
Albert Strasheim schrieb: Hello On Sun, 27 May 2007, Sven Schreiber wrote: Hi, I am wondering whether it's possible to pass (and get back) arrays of complex floats via ctypes. To be concrete, I have managed to access lapack's dgges (Fortran) function using ctypes (thanks to a related

Re: [Numpy-discussion] Median / mean functionality confusing?

2007-05-27 Thread Sven Schreiber
Matthew Brett schrieb: Can I resurrect this thread then by agreeing with Chris, and my original post, that it would be better if median had the same behavior as mean, accepting axis and dtype as inputs? Well I'm not a developer but I guess there is a backwards-compatibility issue here. I mean

Re: [Numpy-discussion] NumPy 1.0.2 released

2007-04-04 Thread Sven Schreiber
Charles R Harris wrote: On 4/3/07, *Travis Oliphant* [EMAIL PROTECTED] NumPy 1.0.2 was released yesterday (4-02-07). Get it by following the And thanks for getting it out. From me too! -sven ___ Numpy-discussion mailing list

Re: [Numpy-discussion] defmatrix.py

2007-03-27 Thread Sven Schreiber
Travis Oliphant schrieb: O.K. So, the problem is that when I defined matrix multiplication, I mistakenly believed that dot always interpreted 1-d arrays as row vectors which it is now clear it doesn't. I think this led to the issues. So, making dot always return arrays seems like the

Re: [Numpy-discussion] Modular toolkit for Data Processing 2.1 released!

2007-03-26 Thread Sven Schreiber
Tiziano Zito schrieb: The optional symeig module contains a Python wrapper for the LAPACK functions to solve the standard and generalized eigenvalue problems for symmetric (hermitian) positive definite matrices. Those specialized algorithms give an important speed-up with respect to the

Re: [Numpy-discussion] matrix indexing question

2007-03-26 Thread Sven Schreiber
Alan G Isaac schrieb: What feels wrong: iterating over a container does not give access to the contained objects. This is not Pythonic. If you iterate over the rows of the matrix, it feels natural to me to get the row vectors -- and as you know a 1d-array does not contain the information

Re: [Numpy-discussion] Matlab - NumPy translation and indexing

2007-03-20 Thread Sven Schreiber
David Koch schrieb: Hi, naive question - how do I get an overview over everything to do with sparse functionality in SciPy 0.5.2 ... I can't find any documentation anywhere. First of all I would recommend to start a new and properly named thread for that good luck, sven

Re: [Numpy-discussion] linalg.eigh orders eigenvalues/eigenvectors differently than linalg.eig

2007-02-19 Thread Sven Schreiber
Zachary Pincus schrieb: Hello all, It seems that the 'eigh' routine from numpy.linalg does not follow the same convention as numpy.linalg.eig in terms of the order of the returned eigenvalues. (And thus eigenvectors as well...) I was told on this list that the ordering should not be

Re: [Numpy-discussion] Cutting 1.0.2 release

2007-02-01 Thread Sven Schreiber
Travis Oliphant schrieb: I think it's time for the 1.0.2 release of NumPy. What outstanding issues need to be resolved before we do it? Hi, I just used real_if_close for the first time, and promptly discovered that it turns matrix input into array output: import numpy as n

Re: [Numpy-discussion] added 1.0.1 release notes to wiki

2007-01-27 Thread Sven Schreiber
Martin Spacek schrieb: Just a note that I've copied over the 1.0.1 release notes from SourceForge: http://sourceforge.net/project/shownotes.php?group_id=1369release_id=468153 over to the wiki: http://scipy.org/ReleaseNotes/NumPy_1.0 Thank you! Should 1.0.1 get its own page, as

Re: [Numpy-discussion] kron bug with zero-length dimensions?

2007-01-27 Thread Sven Schreiber
Sven Schreiber schrieb: Hi, the kron(a,b) function seems to allow shapes such as (0,x) or (y,0) only for the second argument b, not for the first argument a. (See below for examples.) Maybe it's too harsh to call it a bug because the result is typically not defined mathematically

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-19 Thread Sven Schreiber
Matt Knox schrieb: I am definitely in favor of the new maskedarray implementation. I've been working with Pierre on a time series module which is a subclass of the new masked array implementation, and having it as a subclass of ndarray definitely has advantages (and no real disadvantages

Re: [Numpy-discussion] newbie: attempt at data frame

2007-01-03 Thread Sven Schreiber
Vincent Nijs schrieb: If there is an easy way to read array data + variable names using the csv module it would be great if that could be added to cookbook/InputOutput. I couldn't figure out how to do it. Hi Vincent, of course it depends a little on how exactly your csv file looks like,

Re: [Numpy-discussion] newbie: attempt at data frame

2007-01-03 Thread Sven Schreiber
Sven Schreiber schrieb: Hi Vincent, of course it depends a little on how exactly your csv file looks like, but if you just have column headers and the actual data, you might try something like the following: Ok sorry the previous thing doesn't work, I also stumbled over the strings. Here's

Re: [Numpy-discussion] Time series: lag function

2006-12-27 Thread Sven Schreiber
Vincent Nijs schrieb: I am tryin to convert some of my time-series code written in Ox to scipy/numpy (e.g., unit root tests, IRFs, cointegration, etc). Two key functions I need for this are 'lag' and 'diff'. 'diff' is available but 'lag' is apparently not. Below is my attempt at a lag

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-22 Thread Sven Schreiber
Robert Kern schrieb: Pierre GM wrote: Talking about that, what happened to these projects of modular installation of scipy ? Robert promised us last month to explain what went wrong with his approach, but never had the time... I created a module (scipy_subpackages.py, IIRC) next to

Re: [Numpy-discussion] Automatic matrices

2006-12-21 Thread Sven Schreiber
Sven Schreiber schrieb: Keith Goodman schrieb: There are many numpy functions that will take a matrix as input but return an array. The nan functions (nanmin, nanmax, nanargmin, nanargmax, nansum) are an example. So that would be a bug IMHO and should be filed as a ticket. I will do

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-21 Thread Sven Schreiber
A. M. Archibald schrieb: On 20/12/06, Alan G Isaac [EMAIL PROTECTED] wrote: This is my most missed functionality in NumPy. (For now I feel cannot ask students to install SciPy.) Although it is a slippery slope, and I definitely do not want NumPy to slide down it, I would certainly not

Re: [Numpy-discussion] Automatic matrices

2006-12-16 Thread Sven Schreiber
Keith Goodman schrieb: There are many numpy functions that will take a matrix as input but return an array. The nan functions (nanmin, nanmax, nanargmin, nanargmax, nansum) are an example. So that would be a bug IMHO and should be filed as a ticket. I will do that eventually if nobody

Re: [Numpy-discussion] empty data matrix (are they really empty ?)

2006-12-14 Thread Sven Schreiber
[you probably should have started a new thread instead of replying to another one...] Giorgio Luciano schrieb: In the old file I created a matrix on the fly. I know that Numpy and python cannot do that so I found a workaround I'm not sure what you mean what numpy cannot do, but... here's