Hi all,
in the past, Arnd Baecker has made a number of very useful posts on
this matter, and provided some nice utilities to do it. I now needed
to profile some fairly complex codes prior to a big optimization push,
so I went over his material and wrote a little tool to make the whole
process as
Michael,
First of all, thanks for your interest in the exercise of style the new
implementation of MaskedArray is basically nothing but.
On Tuesday 07 November 2006 20:11, Michael Sorich wrote:
1. It would be nice if the masked_singleton could be passed into a
ndarray, as this would allow it
This message was created automatically by mail delivery software.
A message that you sent has not yet been delivered to one or more of its
recipients after more than 72 hours on the queue on
externalmx-1.sourceforge.net.
The message identifier is: 1Ggbsf-00056T-Ol
The subject of the message
Hi, i have a file with following format: 1 2 3 9 2 3 4 4I want to read it and then store the values into two matrices, s.t. A=[1 2;3 9] B=[2 3;4 4]Can anyone tell me how to do this in python? thanks Amit
Check out the all-new Yahoo! Mail - Fire up a more powerful email and
On 11/8/06, izak marais [EMAIL PROTECTED] wrote:
Sorry if this is an obvious question, but what is the easiest way to
multiply matrices in numpy? Suppose I want to do A=B*C*D. The ' * ' operator
apparently does element wise multiplication, as does the 'multiply' ufunc.
All I could find was
On Wed, Nov 08, 2006 at 05:54:17AM -0800, izak marais wrote:
Hi
Sorry if this is an obvious question, but what is the easiest way to multiply
matrices in numpy? Suppose I want to do A=B*C*D. The ' * ' operator apparently
does element wise multiplication, as does the 'multiply' ufunc. All I
Make A,B, matrices
instead of arrays, so instead
A = array((..))
Write
A = matrix((.))
Assuming you had
From numpy import *
Nadav
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of izak marais
Sent: Wednesday, November 08, 2006
15:54
To:
Andrew Straw wrote:
David Cournapeau wrote:
- To send data from the calling process to matlab, you first have to
create a mxArray, which is the basic matlab handler of a matlab array,
and populating it. Using mxArray is very ackward : you cannot create
mxArray from existing data,
A Dimecres 08 Novembre 2006 13:42, amit soni escrigué:
Hi,
i have a file with following format:
1 2
3 9
2 3
4 4
I want to read it and then store the values into two matrices, s.t.
A=[1 2;3 9]
B=[2 3;4 4]
Can anyone tell me how to do this in python?
thanks
Amit
There
Izak, you should first convert you arrays to matrices using ``numpy.matrix``.
or numpy.asmatrix()
--Rob
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with
On 11/8/06, Keith Goodman [EMAIL PROTECTED] wrote:
On 11/8/06, izak marais [EMAIL PROTECTED] wrote: Sorry if this is an obvious question, but what is the easiest way to multiply matrices in numpy? Suppose I want to do A=B*C*D. The ' * ' operator
apparently does element wise multiplication, as
izak marais schrieb:
Hi
Sorry if this is an obvious question, but what is the easiest way to
multiply matrices in numpy? Suppose I want to do A=B*C*D. The ' * '
operator apparently does element wise multiplication, as does the
'multiply' ufunc. All I could find was the numeric function
On 11/8/06, Francesc Altet [EMAIL PROTECTED] wrote:
A Dimecres 08 Novembre 2006 13:42, amit soni escrigué: Hi, i have a file with following format:1 23 92 34 4I want to read it and then store the values into two matrices,
s.t.A=[1 2;3 9]B=[2 3;4 4] Can anyone tell me how to do this in
A Dimecres 08 Novembre 2006 15:55, Charles R Harris escrigué:
Try
In [8]: tmp = fromfile('tmp.txt', sep=' ', dtype=int)
In [9]: a = tmp[:4].reshape(2,2)
In [10]: b = tmp[4:].reshape(2,2)
In [11]: a
Out[11]:
array([[1, 2],
[3, 9]])
In [12]: b
Out[12]:
array([[2, 3],
[im]: Sorry if this is an obvious question, but what is the easiest way to
multiply matrices in numpy? Suppose I want to do A=B*C*D. The ' * ' operator
apparently does element wise multiplication, as does the 'multiply' ufunc.
[im] All I could find was the numeric function
Hi,
in extension to the previous answers, I'd like to say that it is strongly
preferable to use dot(A,dot(B,C)) or dot(dot(A,B),C) instead of A*B*C.
The reason is that with dot(), you can control of which operation is performed
first, which can *massively* influence the time needed, depending
David Cournapeau wrote:
Andrew Straw wrote:
David Cournapeau wrote:
- To send data from the calling process to matlab, you first have to
create a mxArray, which is the basic matlab handler of a matlab array,
and populating it. Using mxArray is very ackward : you cannot
On 11/8/06, Stefan van der Walt [EMAIL PROTECTED] wrote:
This looks very interesting. It works for me on simple scripts, but
whenever I include the lines
from numpy.testing import set_local_path
set_local_path('../../..')
in the input, pycachegrind aborts with
File
how can I calculate arctan of a number in python?thanksAmit
Sponsored Link
Mortgage rates near 39yr lows. $420,000 Mortgage for $1,399/mo - Calculate new house payment-
Using Tomcat but need to do more? Need to support web
There is arctan function
in numpy, and in math (atan, atan2)
Nadav.
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of amit soni
Sent: Wednesday, November 08, 2006
19:36
To:
numpy-discussion@lists.sourceforge.net
Subject: [Numpy-discussion]
Calculating tan
On 08/11/06, Pierre GM [EMAIL PROTECTED] wrote:
I like your idea, but not its implementation. If MA.masked_singleton is
defined as an object, as you suggest, then the dtype of the ndarray it is
passed to becomes 'object', as you pointed out, and that is not something one
would naturally
A good candidate for should be masked marked is NaN. It is supposed
to mean, more or less, no sensible value.
Which might turn out out to be the best indeed. Michael's application would
then look like
import numpy as N
import maskedarray as MA
maskit = N.nan
test = N.array([1,2,maskit])
Johannes Loehnert schrieb:
Hi,
in extension to the previous answers, I'd like to say that it is strongly
preferable to use dot(A,dot(B,C)) or dot(dot(A,B),C) instead of A*B*C.
The reason is that with dot(), you can control of which operation is
performed
first, which can *massively*
Hello,
a piece of my code started giving strange results with certain data; i
managed to track down the cause to a slice array assignment. In the
following code snip; 'mat' is a numpy.array with shape=(22973, 1009),
'vec' is a numpy.array with shape=(22973,), both of type int:
for i in
Building an rpm of numpy-1.0.1.dev3432-1 on fedora core 6 is failing for me.
With either python-2.4.3 or 2.4.4 I try python setup.py bdist_rpm
inside the source directory, and everything seems to go well except for
many File listed twice messages for all kinds of files,
and then at the end there
koara wrote:
Hello,
a piece of my code started giving strange results with certain data; i
managed to track down the cause to a slice array assignment. In the
Also if i first build a sequence of columns and then use
numpy.transpose(numpy.vstack(sequence)) the result is ok. But the
Howdy
On Wed, 08 Nov 2006, Vincent Broman wrote:
Building an rpm of numpy-1.0.1.dev3432-1 on fedora core 6 is failing for me.
With either python-2.4.3 or 2.4.4 I try python setup.py bdist_rpm
inside the source directory, and everything seems to go well except for
many File listed twice
Argh,
On Thu, 09 Nov 2006, Albert Strasheim wrote:
%_unpackaged_files_terminate_build 1
Cut and paste error. Make that
%_unpackaged_files_terminate_build 0
Cheers,
Albert
-
Using Tomcat but need to do more? Need to
Also have a look at the section on Arrays vs Matrices in the Numpy for
Matlab users page. That particular section has nothing to do with
Matlab, really.
http://www.scipy.org/NumPy_for_Matlab_Users
Most of the suggestions and comments made here are already on that page.
--bb
On 11/8/06, Joris De
Try the enclosed spec file. Also, you can use the one from Fedora devel (I
think the one I enclosed is the same).%{!?python_sitearch: %define python_sitearch %(%{__python} -c from
distutils.sysconfig import get_python_lib; print get_python_lib(1))}
# eval to 2.3 if python isn't yet present,
A. M. Archibald wrote:
On 08/11/06, Pierre GM [EMAIL PROTECTED] wrote:
I like your idea, but not its implementation. If MA.masked_singleton is
defined as an object, as you suggest, then the dtype of the ndarray it is
passed to becomes 'object', as you pointed out, and that is not
Spam postage charges or strings attached
Whyi!Drugs often in unable even to once. Visitor Hereplain
simple.Threads Posts am Members or Welcome newest member
spacerocks.Updated program French lot called mtm available address.Tsig
Vermonter worzel Statistics Threads Posts Members Welcome
Hi! I need to numerically solve:
(1-t)x + x' - x = f(t), x(0) = x0, x(1) = x1
I've been trying to use (because it's the approach I inherited) an
elementary finite-difference discretization, but unit tests have shown
that that approach isn't working. After a little review, I believe I
Josh Marshall wrote:
I don't see how you are going to get around doing the copies. Matlab
is in a separate process from the Python interpreter, and there is no
shared memory. In what way do you want these proxy classes to look
like numpy arrays?
I am not talking about the copy in the
On 08/11/06, Tim Hochberg [EMAIL PROTECTED] wrote:
It has always been my experience (on various flavors or Pentium) that
operating on NANs is extremely slow. Does anyone know on what hardware
NANs are *not* slow? Of course it's always possible I just never notice
NANs on hardware where they
35 matches
Mail list logo