Re: [Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-08 Thread Damian Eads
Emanuele Olivetti wrote: Hi, I'm trying to compute the distance matrix (weighted p-norm [*]) between two sets of vectors (data1 and data2). Example: import numpy as N p = 3.0 data1 = N.random.randn(100,20) data2 = N.random.randn(80,20) weight = N.random.rand(20) distance_matrix =

Re: [Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-08 Thread Emanuele Olivetti
Damian Eads wrote: Emanuele Olivetti wrote: ... [*] : ||x - x'||_w = (\sum_{i=1...N} (w_i*|x_i - x'_i|)**p)**(1/p) This feature could be implemented easily. However, I must admit I'm not very familiar with weighted p-norms. What is the reason for raising w to the p instead of

[Numpy-discussion] F2PY ?? Has anyone worked with the F2PY generator?

2008-09-08 Thread Blubaugh, David A.
To All, Has anyone worked with the F2PY generator? This is something that is supposedly built within numpy and scipy. I was wondering if anyone has had any issues with this environment?? It is important for my current employment!! Thanks, David Blubaugh This e-mail transmission

Re: [Numpy-discussion] Floating Point Difference between numpy and numarray

2008-09-08 Thread Christopher Barker
Matthieu Brucher wrote: People are concerned by memory consumption, so if you use more memory than what you think, you can encounter bugs. Least surprise is always better ;) sure, but I'm a bit confused -- there is a tiny amount of memory involved in the accumulator -- isn't it a single

[Numpy-discussion] just curious...why does numpy.where() return tuples?

2008-09-08 Thread Mark Miller
Just for my own benefit, I am curious about this. I am running into problems because I need to archive the result (tuple) returned by a numpy.where statement. Pickle does not seem to like to deal with numpy scalars, and numpy's archiving functions (memmap) can't work on the tuple that gets

Re: [Numpy-discussion] just curious...why does numpy.where() return tuples?

2008-09-08 Thread Robert Kern
On Mon, Sep 8, 2008 at 15:14, Mark Miller [EMAIL PROTECTED] wrote: Just for my own benefit, I am curious about this. I am running into problems because I need to archive the result (tuple) returned by a numpy.where statement. Pickle does not seem to like to deal with numpy scalars, and

Re: [Numpy-discussion] Floating Point Difference between numpy and numarray

2008-09-08 Thread Sebastian Stephan Berg
Yeah, I memory wise it doesn't matter to sum to a double, but just trying around it seems that the mixing of float and double is very slow (at least on my comp) while if the starting array is already double there is almost no difference for summing. Generally double precision calculations should

Re: [Numpy-discussion] 1.2.0rc1 tagged!

2008-09-08 Thread Christopher Barker
Jarrod Millman wrote: Here is the universal Mac binary: https://cirl.berkeley.edu/numpy/numpy-1.2.0rc1-py2.5-macosx10.5.dmg Please test this release ASAP OS-X 10.4.11 dual G5 PPC looks OK to me, except: ERROR: Failure: ImportError (No module named scipy)

Re: [Numpy-discussion] 1.2.0rc1 tagged!

2008-09-08 Thread Robert Kern
On Mon, Sep 8, 2008 at 17:33, Christopher Barker [EMAIL PROTECTED] wrote: Jarrod Millman wrote: Here is the universal Mac binary: https://cirl.berkeley.edu/numpy/numpy-1.2.0rc1-py2.5-macosx10.5.dmg Please test this release ASAP OS-X 10.4.11 dual G5 PPC looks OK to me, except: ERROR:

Re: [Numpy-discussion] 1.2.0rc1 tagged!

2008-09-08 Thread Christopher Barker
Robert Kern wrote: Hmm. That file shouldn't be there. It's not in the 1.2.0rc1 tag in SVN. OK. I cleaned out everything numpy from site-packages, re-installed, and presto: Ran 1721 tests in 12.736s OK (SKIP=1) nose.result.TextTestResult run=1721 errors=0 failures=0 It must have been left

[Numpy-discussion] mixed-EOL problems w/

2008-09-08 Thread Jarrod Millman
I have been trying to get Launchpad to do continuous imports of the SciPy subversion repository into Bazaar: https://code.launchpad.net/~vcs-imports/scipy/trunk This works fine for NumPy: https://code.launchpad.net/~vcs-imports/numpy/trunk However, this doesn't work for SciPy due to a mixed-EOL

[Numpy-discussion] F2PY ?? Has anyone worked with the F2PY generator?

2008-09-08 Thread Blubaugh, David A.
Pauli, Yes, I am utilizing the windows environment. I cannot install f2py. I obtain the following error when I try to execute the setup.py file within the f2py folder located within the numpy master folder: Warning: Assuming default configuration (lib\parser/{setup_parser,setup}.py was

Re: [Numpy-discussion] F2PY ?? Has anyone worked with the F2PY generator?

2008-09-08 Thread Robert Kern
On Mon, Sep 8, 2008 at 18:26, Blubaugh, David A. [EMAIL PROTECTED] wrote: Pauli, Yes, I am utilizing the windows environment. I cannot install f2py. I obtain the following error when I try to execute the setup.py file within the f2py folder located within the numpy master folder: Don't

Re: [Numpy-discussion] mixed-EOL problems w/

2008-09-08 Thread Christopher Barker
Jarrod Millman wrote: However, this doesn't work for SciPy due to a mixed-EOL issue: https://bugs.launchpad.net/launchpad-cscvs/+bug/256050 Colin Watson has recently volunteered to look into fixing this issue and was asking if anyone had a preference about how this should be solved. I vote

Re: [Numpy-discussion] F2PY ?? Has anyone worked with the F2PY generator?

2008-09-08 Thread Mark Miller
If numpy is installed, then f2py will be too. On the windows environment, there is a file called f2py.py that you can call from the command line. It should be in the 'scripts' directory of your Python installation. Try something like this: python c:\python25\scripts\f2py.py (of course change

Re: [Numpy-discussion] write binary data

2008-09-08 Thread Robert Kern
On Mon, Sep 8, 2008 at 18:46, jinbo wang [EMAIL PROTECTED] wrote: Hi guys, I am new to python, and still wondering around to solve a simple problem. I have an array A, and want to save it to a binary data file with 'float64' and 'big-endian' specified. I searched online, but still don't

[Numpy-discussion] planning for numpy 1.3.0 release

2008-09-08 Thread Jarrod Millman
Now that 1.2.0 is almost finalized, I wanted to ask everyone to start thinking about what they plan to work on for the next minor release: http://scipy.org/scipy/numpy/milestone/1.3.0 We have been gradually moving toward a more time-based release schedule over the last several months. In this

Re: [Numpy-discussion] numpy or scipy ?

2008-09-08 Thread David Cournapeau
On Mon, 2008-09-08 at 22:05 -0600, Charles R Harris wrote: On Mon, Sep 8, 2008 at 9:03 PM, xiaojf [EMAIL PROTECTED] wrote: Hi all, I'm trying to replace matlab with python in my daily work and I have several problems now. 1)

Re: [Numpy-discussion] planning for numpy 1.3.0 release

2008-09-08 Thread David Cournapeau
On Mon, 2008-09-08 at 17:12 -0700, Jarrod Millman wrote: Now that 1.2.0 is almost finalized, I wanted to ask everyone to start thinking about what they plan to work on for the next minor release: http://scipy.org/scipy/numpy/milestone/1.3.0 We have been gradually moving toward a more