Good day,
Reversing a 1-dimensional array in numpy is simple,
A = A[:,:,-1] .
However A is a new array referring to the old one and is no longer
contiguous.
While trying to reverse an array in place and keep it contiguous, I
encountered some weird behavior. The reason for keeping it
Damian Eads wrote:
Good day,
Reversing a 1-dimensional array in numpy is simple,
A = A[:,:,-1] .
Err, I meant A=A[::-1] here. My apologies.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman
Thanks Anne for your very informative response.
Anne Archibald wrote:
On 03/02/2008, Damian Eads [EMAIL PROTECTED] wrote:
Good day,
Reversing a 1-dimensional array in numpy is simple,
A = A[:,:,-1] .
However A is a new array referring to the old one and is no longer
contiguous
Dear Vince,
You probably have heard better solutions but I think what I do works and
is simple to learn. When I need to call C++ code from Python, I write a
wrapper extern C function that calls the C++ function that returns the
result. Then I just use ctypes to call the extern C function from
David Cournapeau wrote:
On Mon, 2008-02-11 at 22:50 -0700, Damian Eads wrote:
Dear Lou,
You may want to try using distutils or setuputils, which makes compiling
extensions much easier. It does the hard work of finding out which flags
are needed to compile extensions on the host platform
Robert Kern wrote:
On Feb 12, 2008 12:14 AM, Damian Eads [EMAIL PROTECTED] wrote:
David Cournapeau wrote:
On Mon, 2008-02-11 at 22:50 -0700, Damian Eads wrote:
Dear Lou,
You may want to try using distutils or setuputils, which makes compiling
extensions much easier. It does the hard work
Dear Lou,
You may want to try using distutils or setuputils, which makes compiling
extensions much easier. It does the hard work of finding out which flags
are needed to compile extensions on the host platform. There are many
examples on the web on how to use distutils to build C extensions
In MATLAB, scalars are 1x1 arrays, and thus they can be indexed. There
have been situations in my use of Numpy when I would have liked to index
scalars to make my code more general.
It's not a very pressing issue for me but it is an interesting issue.
Whenever I index an array with a sequence
While we are on the subject of indexing... I use xranges all over the
place because I tend to loop over big data sets. Thus I try avoid to
avoid allocating large chunks of memory unnecessarily with range. While
I try to be careful not to let xranges propagate to the ndarray's []
operator,
Neal Becker wrote:
Sounds like this needs a bit of re-thinking.
Given a set of function signatures:
F(a,b,c)
F(d,e,f)
...
The user calls:
F(A,B,C) (no relation between a,A ,etc)
How do we find the 'best' match?
I think we can start with:
Rules:
1) Only allowed (at most) 1
Robert Kern wrote:
On Sat, Mar 1, 2008 at 6:45 PM, Lisandro Dalcin [EMAIL PROTECTED] wrote:
Sorry for the stupid question, but my English knowledge just covers
reading and writting (the last, not so good)
At the very begining, http://scipy.org/ says
SciPy (pronounced Sigh Pie) ...
Lisandro Dalcin wrote:
On 3/1/08, Charles R Harris [EMAIL PROTECTED] wrote:
So they differ in the least significant bit. Not surprising, I expect the
Fortran compiler might well perform operations in different order,
accumulate in different places, etc. It might also accumulate in higher
Gregory, Matthew wrote:
Hi list,
I'm a definite newbie to numpy, but finding the library to be incredibly
useful.
I'm trying to calculate a weighted majority using numpy functions. I
have two sets of image stacks (one is values, the other weights) that I
read into 3D numpy arrays.
Hi Gregory,
Gregory, Matthew wrote:
Eads, Damian wrote:
You may need to be a bit more specific by what you mean by
weighted majority. What are the range of values for values
and weights, specifically? This sounds a lot like pixel
classification where each pixel is classified with a
multithreaded programming with the same brush just because there exist
pathologies.
Robert: what benchmarks were performed showing less than pleasing
performance gains?
Anne Archibald wrote:
On 15/03/2008, Damian Eads [EMAIL PROTECTED] wrote:
Robert Kern wrote:
Eric Jones tried to use
Hi,
I am working on a memory-intensive experiment with very large arrays so
I must be careful when allocating memory. Numpy already supports a
number of in-place operations (+=, *=) making the task much more
manageable. However, it is not obvious to me out I set values based on a
very simple
Damian Eads wrote:
Anne Archibald wrote:
On 23/03/2008, Damian Eads [EMAIL PROTECTED] wrote:
Hi,
I am working on a memory-intensive experiment with very large arrays so
I must be careful when allocating memory. Numpy already supports a
number of in-place operations (+=, *=) making
umathmodule.c.src
Please advise. Thank you.
Damian
-
Damian Eads Ph.D. Student
Jack Baskin School of Engineering, UCSCE2-381
1156 High Street
Santa Cruz, CA 95064http://www.soe.ucsc.edu/~eads
Damian Eads
David Cournapeau wrote:
Jarrod Millman wrote:
Hello,
David Cournapeau has prepared a new win32 installer, which is aimed at
solving the recurring problem of non working atlas on different sets
of CPU. This installer simply checks which cpu you have, and installs
the appropriate numpy
David Cournapeau wrote:
Jarrod Millman wrote:
Hello,
David Cournapeau has prepared a new win32 installer, which is aimed at
solving the recurring problem of non working atlas on different sets
of CPU. This installer simply checks which cpu you have, and installs
the appropriate numpy
Hi Alex,
a g wrote:
Hi. This is a very basic question, sorry if it's irritating. If i
didn't find the answer written already somewhere on the site, please
point me to it. That'd be great.
You should look at any of the documents below and read up on array
slicing. It is perhaps the most
Will this effect SVN and Trac access?
Thanks!
Damian
Peter Wang wrote:
Hi everyone,
This evening and this weekend, we will be doing a major overhaul of
Enthought's internal network infrastructure. We will be cleaning up a
large amount of legacy structure and transitioning to a more
Hi,
Looks like a fun discussion: it's too bad for me I did not join it
earlier. My first try at scipy-cluster was completely in Python. Like
you, I also tried to find the most efficient way to transform the
distance matrix when joining two clusters. Eventually my data sets
became big enough
Hi,
I noticed some odd behavior in binary_repr when the width parameter is
used. In most cases it works,
In [23]: numpy.binary_repr(1, width=8)
Out[23]: '0001'
In [24]: numpy.binary_repr(2, width=8)
Out[24]: '0010'
In [25]: numpy.binary_repr(3, width=8)
Out[25]: '0011'
In [26]:
Whoops. In one xterm, I'm going off the Fedora package and in the other,
the SVN source tree. SVN seems to work. Sorry for the unnecessary message.
On Wed, Jun 4, 2008 at 2:59 AM, Robert Kern wrote:
In [27]: numpy.binary_repr(0, width=8)
Out[27]: '0'
Is this what the output is intended
Hi there,
I'm using nansum for some code and noticed it does a bit of copying.
Specifically, the nanxxx functions copy the input array, create an isnan
boolean mask, set the nan values to make them insignificant (nansum: 0,
nanmin: inf, or nanmax: -inf), and then call xxx to compute the
On Thu, Jul 3, 2008 at 6:57 AM, Brain Stormer [EMAIL PROTECTED] wrote:
I am using numpy to create an array then filling some of the values
using a
for loop, I was wondering if there is way to easily fill the values
without
iterating through sort of like array.fill[start:stop,start
:stop]?
Hi there,
I ran into a little problem in some type checking code for a C extension
I'm writing. I construct X as a C-long array and then I cast it to a C-int
array Y, however the type code does not change. However, when I try
constructing the array from scratch as a C-int, I get the right type
Friends,
Are we meeting over IRC chat? I'd like to help with the sprint but
remotely. I have to leave LA today, unfortunately.
Thanks!
Damian
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
a look
to the separate package. Please drop an email to this list when
distance will be moved.
Thanks,
Emanuele
-
Damian Eads Ph.D. Student
Jack Baskin School of Engineering, UCSCE2-479
1156 High Street
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 =
-discussion
--
Sent from my mobile device
-
Damian Eads Ph.D. Student
Jack Baskin School of Engineering, UCSCE2-489
1156 High Street Machine Learning Lab
Santa Cruz, CA 95064http
--
-
Damian Eads Ph.D. Student
Jack Baskin School of Engineering, UCSCE2-489
1156 High Street Machine Learning Lab
Santa Cruz, CA 95064http://www.soe.ucsc.edu/~eads
___
Numpy-discussion mailing list
-
Damian Eads Ph.D. Student
Jack Baskin School of Engineering, UCSCE2-489
1156 High Street Machine Learning Lab
Santa Cruz, CA 95064http://www.soe.ucsc.edu/~eads
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
-
Damian Eads Ph.D. Candidate
Jack Baskin School
/mailman/listinfo/numpy-discussion
-
Damian Eads Ph.D. Candidate
Jack Baskin School of Engineering, UCSCE2-489
1156 High Street Machine Learning Lab
Santa Cruz, CA 95064http
mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
--
-
Damian Eads Ph.D. Candidate
University of California Computer Science
1156 High Street Machine
37 matches
Mail list logo