On Fri, Jun 5, 2009 at 11:30 AM, Alan G Isaac wrote:
> On 6/5/2009 11:38 AM Olivier Verdier apparently wrote:
> > I think matrices can be pretty tricky when used for
> > teaching. For instance, you have to explain that all the
> > operators work component-wise, except the multiplication!
> > Ano
On Fri, Jun 5, 2009 at 5:59 PM, Brent Pedersen wrote:
> On Fri, Jun 5, 2009 at 2:01 PM, Keith Goodman wrote:
>> On Fri, Jun 5, 2009 at 1:22 PM, Brent Pedersen wrote:
>>> On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
> On Fri, J
On Fri, Jun 5, 2009 at 5:19 PM, Christopher Barker
wrote:
> Robert Kern wrote:
> x = np.array([1,2,3])
> timeit x.sum()
>>> 10 loops, best of 3: 3.01 µs per loop
> from numpy import sum
> timeit sum(x)
>>> 10 loops, best of 3: 4.84 µs per loop
>
> that is a VERY short array
Robert Kern wrote:
x = np.array([1,2,3])
timeit x.sum()
>> 10 loops, best of 3: 3.01 µs per loop
from numpy import sum
timeit sum(x)
>> 10 loops, best of 3: 4.84 µs per loop
that is a VERY short array, so one extra function call overhead could
make the difference. Is i
On Fri, Jun 5, 2009 at 17:54, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at 3:02 PM, Alan G Isaac wrote:
>> I think something close to this would be possible:
>> add dot as an array method.
>> A .dot(B) .dot(C)
>> is not as pretty as
>> A * B * C
>> but it is much better than
>>
On Fri, Jun 5, 2009 at 3:02 PM, Alan G Isaac wrote:
> I think something close to this would be possible:
> add dot as an array method.
> A .dot(B) .dot(C)
> is not as pretty as
> A * B * C
> but it is much better than
> np.dot(np.dot(A,B),C)
I've noticed that x.sum() is faste
On Fri, Jun 5, 2009 at 4:02 PM, Alan G Isaac wrote:
> On 6/5/2009 5:41 PM Chris Colbert apparently wrote:
> > well, it sounded like a good idea.
>
>
> I think something close to this would be possible:
> add dot as an array method.
>A .dot(B) .dot(C)
> is not as pretty as
>A * B *
On Fri, Jun 5, 2009 at 16:14, Michael McNeil Forbes
wrote:
> >>> np.array([0,1,2,3])[1:-1]
> array([1, 2])
>
> but
>
> >>> np.array([0,1,2,3])[np.s_[1:-1]]
> array([1, 2, 3])
> >>> np.array([0,1,2,3])[np.index_exp[1:-1]]
> array([1, 2, 3])
>
> Possible fix:
> class IndexExpression(object):
>
> I think something close to this would be possible:
> add dot as an array method.
> A .dot(B) .dot(C)
> is not as pretty as
> A * B * C
> but it is much better than
> np.dot(np.dot(A,B),C)
That is much better.
Matthew
___
Numpy-dis
On 6/5/2009 5:41 PM Chris Colbert apparently wrote:
> well, it sounded like a good idea.
I think something close to this would be possible:
add dot as an array method.
A .dot(B) .dot(C)
is not as pretty as
A * B * C
but it is much better than
np.dot(np.dot(A,B),C)
In fact
On Fri, Jun 5, 2009 at 2:01 PM, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at 1:22 PM, Brent Pedersen wrote:
>> On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
>>> On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
On Fri, Jun 5, 2009 at 12:53 PM, wrote:
> On Fri, Jun 5, 2009 at
well, it sounded like a good idea.
Oh, well.
On Fri, Jun 5, 2009 at 5:28 PM, Robert Kern wrote:
> On Fri, Jun 5, 2009 at 16:24, Chris Colbert wrote:
> > How about just introducing a slightly different syntax which tells numpy
> to
> > handle the array like a matrix:
> >
> > Some thing along
I'll caution anyone from using Atlas from the repos in Ubuntu 9.04 as the
package is broken:
https://bugs.launchpad.net/ubuntu/+source/atlas/+bug/363510
just build Atlas yourself, you get better performance AND threading.
Building it is not the nightmare it sounds like. I think i've done it a
t
>>> np.array([0,1,2,3])[1:-1]
array([1, 2])
but
>>> np.array([0,1,2,3])[np.s_[1:-1]]
array([1, 2, 3])
>>> np.array([0,1,2,3])[np.index_exp[1:-1]]
array([1, 2, 3])
Possible fix:
class IndexExpression(object):
...
def __len__(self):
return 0
(Presently this returns sys.maxin
On Fri, Jun 5, 2009 at 16:24, Chris Colbert wrote:
> How about just introducing a slightly different syntax which tells numpy to
> handle the array like a matrix:
>
> Some thing along the lines of this:
>
> A = array[[..]]
> B = array[[..]]
>
> elementwise multipication (as it currently is):
>
> C
How about just introducing a slightly different syntax which tells numpy to
handle the array like a matrix:
Some thing along the lines of this:
A = array[[..]]
B = array[[..]]
elementwise multipication (as it currently is):
C = A * B
matrix multiplication:
C = {A} * {B}
or
C = [A] * [B]
or
On 6/5/2009 3:49 PM Stéfan van der Walt apparently wrote:
> If the Matrix class is to remain, we need to take the steps
> necessary to integrate it into NumPy properly.
I think this requires a list of current problems.
Many of the problems for NumPy have been addressed over time.
I believe the rem
On Fri, Jun 5, 2009 at 1:22 PM, Brent Pedersen wrote:
> On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
>> On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
>>> On Fri, Jun 5, 2009 at 12:53 PM, wrote:
On Fri, Jun 5, 2009 at 2:07 PM, Brian Blais wrote:
> Hello,
> I have a v
On Fri, Jun 5, 2009 at 4:35 PM, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at 1:31 PM, wrote:
>> On Fri, Jun 5, 2009 at 4:27 PM, Keith Goodman wrote:
>>> On Fri, Jun 5, 2009 at 1:22 PM, Brent Pedersen wrote:
On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at
On Fri, Jun 5, 2009 at 1:31 PM, wrote:
> On Fri, Jun 5, 2009 at 4:27 PM, Keith Goodman wrote:
>> On Fri, Jun 5, 2009 at 1:22 PM, Brent Pedersen wrote:
>>> On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at
On Fri, Jun 5, 2009 at 1:27 PM, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at 1:22 PM, Brent Pedersen wrote:
>> On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
>>> On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
On Fri, Jun 5, 2009 at 12:53 PM, wrote:
> On Fri, Jun 5, 2009 at
On Fri, Jun 5, 2009 at 4:27 PM, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at 1:22 PM, Brent Pedersen wrote:
>> On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
>>> On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
On Fri, Jun 5, 2009 at 12:53 PM, wrote:
> On Fri, Jun 5, 2009 a
On Fri, Jun 5, 2009 at 1:22 PM, Brent Pedersen wrote:
> On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
>> On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
>>> On Fri, Jun 5, 2009 at 12:53 PM, wrote:
On Fri, Jun 5, 2009 at 2:07 PM, Brian Blais wrote:
> Hello,
> I have a v
On Fri, Jun 5, 2009 at 1:05 PM, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
>> On Fri, Jun 5, 2009 at 12:53 PM, wrote:
>>> On Fri, Jun 5, 2009 at 2:07 PM, Brian Blais wrote:
Hello,
I have a vectorizing problem that I don't see an obvious way to solve.
On Fri, Jun 5, 2009 at 1:01 PM, Keith Goodman wrote:
> On Fri, Jun 5, 2009 at 12:53 PM, wrote:
>> On Fri, Jun 5, 2009 at 2:07 PM, Brian Blais wrote:
>>> Hello,
>>> I have a vectorizing problem that I don't see an obvious way to solve. What
>>> I have is a vector like:
>>> obs=array([1,2,3,4,3,
On Fri, Jun 5, 2009 at 3:53 PM, wrote:
> On Fri, Jun 5, 2009 at 2:07 PM, Brian Blais wrote:
>> Hello,
>> I have a vectorizing problem that I don't see an obvious way to solve. What
>> I have is a vector like:
>> obs=array([1,2,3,4,3,2,1,2,1,2,1,5,4,3,2])
>> and a matrix
>> T=zeros((6,6))
>> and
On Fri, Jun 5, 2009 at 12:53 PM, wrote:
> On Fri, Jun 5, 2009 at 2:07 PM, Brian Blais wrote:
>> Hello,
>> I have a vectorizing problem that I don't see an obvious way to solve. What
>> I have is a vector like:
>> obs=array([1,2,3,4,3,2,1,2,1,2,1,5,4,3,2])
>> and a matrix
>> T=zeros((6,6))
>> an
Hi Alan
2009/6/5 Alan G Isaac :
> You should take it very seriously when someone
> reports to you that the matrix object is a crucial to them,
> e.g., as a teaching tool. Even if you do not find
> personally persuasive an example like
> http://mail.scipy.org/pipermail/numpy-discussion/2009-June/0
On Fri, Jun 5, 2009 at 2:07 PM, Brian Blais wrote:
> Hello,
> I have a vectorizing problem that I don't see an obvious way to solve. What
> I have is a vector like:
> obs=array([1,2,3,4,3,2,1,2,1,2,1,5,4,3,2])
> and a matrix
> T=zeros((6,6))
> and what I want in T is a count of all of the transit
On Fri, Jun 5, 2009 at 11:07 AM, Brian Blais wrote:
> Hello,
> I have a vectorizing problem that I don't see an obvious way to solve. What
> I have is a vector like:
> obs=array([1,2,3,4,3,2,1,2,1,2,1,5,4,3,2])
> and a matrix
> T=zeros((6,6))
> and what I want in T is a count of all of the transi
Hello,
I have a vectorizing problem that I don't see an obvious way to
solve. What I have is a vector like:
obs=array([1,2,3,4,3,2,1,2,1,2,1,5,4,3,2])
and a matrix
T=zeros((6,6))
and what I want in T is a count of all of the transitions in obs,
e.g. T[1,2]=3 because the sequence 1-2 hap
As someone who is very used to thinking in terms of matrices and who just
went through the adjustment of translating matlab-like code to numpy, I
found the current matrix module to be confusing. It's poor integration with
the rest of numpy/scipy (in particular, scipy.optimize.fmin_cg) made it more
2009/6/5 David Cournapeau :
> Eric Firing wrote:
>>
>> David,
>>
>> The eigen web site indicates that eigen achieves high performance
>> without all the compilation difficulty of atlas. Does eigen have enough
>> functionality to replace atlas in numpy?
>
> No, eigen does not provide a (complete) B
Eric Firing wrote:
>
> David,
>
> The eigen web site indicates that eigen achieves high performance
> without all the compilation difficulty of atlas. Does eigen have enough
> functionality to replace atlas in numpy?
No, eigen does not provide a (complete) BLAS/LAPACK interface. I don't
know if
On Fri, Jun 5, 2009 at 1:33 PM, Geoffrey Ely wrote:
> On Jun 5, 2009, at 10:18 AM, josef.p...@gmail.com wrote:
>> I'm only using arrays for consistency, but my econometrics code is
>> filled with arr[np.newaxis,:] .
>
>
> arr[None,:] is a lot cleaner in my opinion, especially when using
> "numpy"
On Jun 5, 2009, at 10:18 AM, josef.p...@gmail.com wrote:
> I'm only using arrays for consistency, but my econometrics code is
> filled with arr[np.newaxis,:] .
arr[None,:] is a lot cleaner in my opinion, especially when using
"numpy" as the namespace.
-Geoff
___
On 6/5/2009 11:38 AM Olivier Verdier apparently wrote:
> I think matrices can be pretty tricky when used for
> teaching. For instance, you have to explain that all the
> operators work component-wise, except the multiplication!
> Another caveat is that since matrices are always 2x2, the
> "sca
David Cournapeau wrote:
>
> It really depends on the CPU, compiler, how atlas was compiled, etc...
> it can be slightly faster to 10 times faster (if you use a very poorly
> optimized ATLAS).
>
> For some recent benchmarks:
>
> http://eigen.tuxfamily.org/index.php?title=Benchmark
>
David,
Th
On Fri, Jun 5, 2009 at 11:38 AM, Olivier Verdier wrote:
> I agree. It would be a good idea to have matrices out of numpy as a
> standalone package.
> Indeed, having matrices in the numpy core comes at a pedagogical cost.
> Newcomers (as I once was) do not know which to use. Matrix or array? It
> t
> I don't think numpy/scipy are zip safe, the numpy packageloader uses
os.path to find files.
Evidently! :-)
But the strange thing is that all this worked fine with Scipy 0.6.0 -
it's only since 0.7.0 was released that this started going wrong.
Sal
Disclaimer CALYON UK:
This email does not cre
I agree. It would be a good idea to have matrices out of numpy as a
standalone package.
Indeed, having matrices in the numpy core comes at a pedagogical cost.
Newcomers (as I once was) do not know which to use. Matrix or array? It
turns out that the vast majority of numpy/scipy modules use arrays,
Hi,
Thanks for the suggestion.
Unfortunately I'm using university managed machines here, so
I have no control over the distribution, not even root access.
However, I just downloaded the latest Enthought distribution,
which uses numpy 1.3, and now numpy is only 30% to 60% slower
than matlab, inst
On Fri, Jun 5, 2009 at 9:25 AM, Fadhley Salim
wrote:
> I've noticed that with scipy 0.7.0 + numpy 1.2.1, an importing the factorial
> function from the scipy module always seems to fail when scipy is installed
> as a zipped ",egg" file. When the project is installed as an unzipped
> directory it w
I've noticed that with scipy 0.7.0 + numpy 1.2.1, an importing the
factorial function from the scipy module always seems to fail when scipy
is installed as a zipped ",egg" file. When the project is installed as
an unzipped directory it works fine.
Is there any reason why this function should not
Hi David,
Let me suggest that you try the latest version of Ubuntu (9.04/Jaunty),
which was released two months ago. It sounds like you are effectively using
release 5 of RedHat Linux which was originally released May 2007. There
have been updates (5.1, 5.2, 5.3), but, if my memory serves me cor
Hi,
The RC2 for 0.7.1 scipy release has just been tagged. This is a
bug-fixes only release, see below for the release notes. More
information can
also be found on the trac website:
http://projects.scipy.org/scipy/milestone/0.7.1
The only code change compared to the RC1 is one fix which is ess
Sebastian Walter wrote:
> On Fri, Jun 5, 2009 at 11:58 AM, David
> Cournapeau wrote:
>
>> Sebastian Walter wrote:
>>
>>> On Thu, Jun 4, 2009 at 10:56 PM, Chris Colbert wrote:
>>>
>>>
I should update after reading the thread Sebastian linked:
The current 1.3 version of
On Fri, Jun 5, 2009 at 11:58 AM, David
Cournapeau wrote:
> Sebastian Walter wrote:
>> On Thu, Jun 4, 2009 at 10:56 PM, Chris Colbert wrote:
>>
>>> I should update after reading the thread Sebastian linked:
>>>
>>> The current 1.3 version of numpy (don't know about previous versions) uses
>>> the op
Sebastian Walter wrote:
> On Thu, Jun 4, 2009 at 10:56 PM, Chris Colbert wrote:
>
>> I should update after reading the thread Sebastian linked:
>>
>> The current 1.3 version of numpy (don't know about previous versions) uses
>> the optimized Atlas BLAS routines for numpy.dot() if numpy was compi
On Thu, Jun 4, 2009 at 10:56 PM, Chris Colbert wrote:
> I should update after reading the thread Sebastian linked:
>
> The current 1.3 version of numpy (don't know about previous versions) uses
> the optimized Atlas BLAS routines for numpy.dot() if numpy was compiled with
> these libraries. I've ve
Thanks for the replies so far.
I had already tested using an already transposed matrix in the loop,
it didn't make any difference. Oh and btw, I'm on (Scientific) Linux.
I used the Enthought distribution, but I guess I'll have to get
my hands dirty and try to get that Atlas thing working (I'm not
On 4-Jun-09, at 4:38 PM, Anne Archibald wrote:
> It seems to me that this is the basic source of the problem. Perhaps
> this can be addressed? I realize maintaining compatibility with the
> current behaviour is necessary, so how about a multistage deprecation:
>
> 1. add a keyword argument to inte
52 matches
Mail list logo