Hi everyone -
Recarrays have convenience attributes such that
fields may be accessed through "." in additioin to
the "field()" method. These attributes are designed for
read only; one cannot alter the data through them.
Yet they are writeable:
>>> tr=numpy.recarray(10, formats='i4,f8,f8', names=
Hi,
> def d4():
> d = zeros([4, 1000], dtype=float)
> for i in range(4):
> xy = A[i] - B
> d[i] = sqrt( sum(xy**2, axis=1) )
> return d
>
> Maybe there's another alternative to d4?
> Thanks again,
I think this is the fastest you can get. Maybe it would be nicer to use
Please replace:
C = 4
N = 1000
> d = zeros([C, N], dtype=float)
BK.
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Thanks! Avoiding the inner loop is MUCH faster (~20-300 times than the
original). Nevertheless I don't think I can use hypot as it only works
for two dimensions. The general problem I have is:
A = random( [C, K] )
B = random( [N, K] )
C ~ 1-10
N ~ Large (thousands, millions.. i.e. my dataset)
K ~
I noticed in your note labeled 'June 16, 2006' that you refer to the
"desc" field. However, in the struct description above, there is only a
field named "descr".
Also, I suggest that you update the information in the comments of descr
field of the structure description to contain the fact that
On 6/16/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
> There is talk of ctypes supporting the new interface which is a worthy
> development. Please encourage that if you can.
That would certainly be excellent, esp. given how ctypes is slated to
be officially part of python 2.5. I think it wou
I just updated the array interface page to emphasize we now have version
3. NumPy still supports objects that expose (the C-side) of version 2
of the array interface, though.
The new interface is basically the same except (mostly) for asthetics:
The differences are listed at the bottom of
Sorry, I forgot to mention that I’m working on a
Solaris system and installed it in /usr/local/gcc3xbuilt instead of /usr/local.
Thanks.
JC
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sou
Hi folks!
I’d like to install numpy and remove numeric, are
there instructions to remove numeric-24.1?
Thanks.
JC
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/l
The initial bounces actually say, and I quote:
Technical details of temporary failure:
TEMP_FAILURE: SMTP Error (state 8): 550-"rejected because your SMTP
server, 66.249.92.170, is in the Spamcop RBL.
550 See http://www.spamcop.net/bl.shtml for more information."
On 6/16/06, Robert Kern <[EMAIL P
Erin Sheldon wrote:
>Anyway - Recarrays have convenience attributes such that
>fields may be accessed through "." in additioin to
>the "field()" method. These attributes are designed for
>read only; one cannot alter the data through them.
>Yet they are writeable:
>
>
>
tr=numpy.recarray(10,
Thomas Heller wrote:
> Robert Kern wrote:
>
>> Francesc Altet wrote:
>>
>>> A Divendres 09 Juny 2006 11:54, Albert Strasheim va escriure:
>>>
>>>
Just out of curiosity:
In [1]: x = N.array([])
In [2]: x.__array_data__
Out[2]: ('0x01C23EE0', False)
>
Robert Kern wrote:
> Erin Sheldon wrote:
>
>>Hi everyone -
>>
>>(this is my fourth try in the last 24 hours to post this.
>>Apparently, the gmail smtp server is in the blacklist!!
>>this is bad).
>
> I doubt it since that's where my email goes through.
And of course that's utterly bogus since I
Erin Sheldon wrote:
> Hi everyone -
>
> (this is my fourth try in the last 24 hours to post this.
> Apparently, the gmail smtp server is in the blacklist!!
> this is bad).
I doubt it since that's where my email goes through. Sourceforge is frequently
slow, so please have patience if your mail doe
Hi everyone -
(this is my third try in the last 24 hours to post this.
For some reason it hasn't been making it through)
Recarrays have convenience attributes such that
fields may be accessed through "." in additioin to
the "field()" method. These attributes are designed for
read only; one canno
Hi everyone -
(this is my fourth try in the last 24 hours to post this.
Apparently, the gmail smtp server is in the blacklist!!
this is bad).
Anyway - Recarrays have convenience attributes such that
fields may be accessed through "." in additioin to
the "field()" method. These attributes are des
Travis Oliphant wrote:
> Thanks for the continuing discussion on the array interface.
>
> I'm thinking about this right now, because I just spent several hours
> trying to figure out if it is possible to add additional
> "object-behavior" pointers to a type by creating a metatype that
> sub-typ
A Divendres 16 Juny 2006 21:25, Thomas Heller va escriure:
> Robert Kern wrote:
> > Like how Win64 uses 32-bit longs and 64-bit pointers. And then there's
> > signedness. Please don't use Python ints to encode pointers. Holding
> > arbitrary pointers is the job of CObjects.
>
> (Sorry, I'm late in
Robert Kern wrote:
> Francesc Altet wrote:
>> A Divendres 09 Juny 2006 11:54, Albert Strasheim va escriure:
>>
>>>Just out of curiosity:
>>>
>>>In [1]: x = N.array([])
>>>
>>>In [2]: x.__array_data__
>>>Out[2]: ('0x01C23EE0', False)
>>>
>>>Is there a reason why the __array_data__ tuple stores the
Hey Glen
http://www.scipy.org/Cookbook/C_Extensions
covers most of the boilerplate you need to get started with extension
modules.
Regards,
Albert
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:numpy-
> [EMAIL PROTECTED] On Behalf Of Glen W. Mabey
> Sent: 16 June 2006 18:24
> T
hi,
I need to handle strings shaped by a numpy array whose data own to a C
structure. There is several possible answers to this problem :
1) use a numpy array of strings (PyArray_STRING) and so a (char *) object
in C. It works as is, but you need to define a maximum size to your strings
beca
Christopher Barker wrote:
>Bruce Southey wrote:
>
>
>>Please run the exact same code in Matlab that you are running in
>>NumPy. Many of Matlab functions are very highly optimized so these are
>>provided as binary functions. I think that you are running into this
>>so you are not doing the correc
Bruce Southey wrote:
> Please run the exact same code in Matlab that you are running in
> NumPy. Many of Matlab functions are very highly optimized so these are
> provided as binary functions. I think that you are running into this
> so you are not doing the correct comparison
He is doing the cor
Glen W. Mabey wrote:
> That is, when I run:
> import DFALG
> DFALG.bsvmdf( 3 )
> after compiling the below code, it always segfaults, regardless of the
> type of the argument given. Just as a sanity check (it's been a little
> while since I have written an extension module for Python) I c
Hello,
I am writing a python extension module to create an interface to some C
code, and am using numpy array as the object type for transferring data
back and forth.
Using either the numpy svn from yesterday, or 0.9.6 or 0.9.8, with or
without optimized ATLAS installation, I get a segfault at w
Sasha wrote:
>On 6/16/06, Sven Schreiber <[EMAIL PROTECTED]> wrote:
>
>
>>
>>Abbreviations will emerge anyway, the question is merely: Will numpy
>>provide/recommend them (in addition to having long names maybe), or will
>>it have to be done by somebody else, possibly resulting in many
>>dif
On Fri, 16 Jun 2006, Sven Schreiber apparently wrote:
> Abbreviations will emerge anyway, the question is merely:
> Will numpy provide/recommend them (in addition to having
> long names maybe), or will it have to be done by somebody
> else, possibly resulting in many different sets of
> abbrev
Hi,
Please run the exact same code in Matlab that you are running in
NumPy. Many of Matlab functions are very highly optimized so these are
provided as binary functions. I think that you are running into this
so you are not doing the correct comparison
So the ways around it are to write an extensi
On 6/16/06, Sven Schreiber <[EMAIL PROTECTED]> wrote:
>
> Abbreviations will emerge anyway, the question is merely: Will numpy
> provide/recommend them (in addition to having long names maybe), or will
> it have to be done by somebody else, possibly resulting in many
> different sets of abbrev
Sebastian Beca wrote:
>Hi,
>I'm working with NumPy/SciPy on some algorithms and i've run into some
>important speed differences wrt Matlab 7. I've narrowed the main speed
>problem down to the operation of finding the euclidean distance
>between two matrices that share one dimension rank (dist in M
I was trying to build matplotlib after installing the latest svn version of
numpy (r2426), and compilation bailed on missing headers. It seems that the
headers from build/src.linux*/numpy/core/ are not properly being installed
during setup.py's install phase to
$PYTHON_SITE_LIB/site-packages/numpy/
I don't have anything constructive to add at the moment, so I'll just
throw out an unelucidated opinion:
+1 for longish names.
-1 for two sets of names.
-tim
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sou
Alexandre Fayolle schrieb:
> On Fri, Jun 16, 2006 at 10:43:42AM +0200, Sven Schreiber wrote:
>>> Again, there is no defense for abbreviating linear_least_squares
>>> because it is unlikely to appear in an expression and waste valuable
>>> horisontal space.
>> not true imho; btw, I would suggest "
On Fri, Jun 16, 2006 at 10:43:42AM +0200, Sven Schreiber wrote:
> > Again, there is no defense for abbreviating linear_least_squares
> > because it is unlikely to appear in an expression and waste valuable
> > horisontal space.
>
> not true imho; btw, I would suggest "ols" (ordinary least square
Hi,
I have an extension library which I wanted to interface with NumPy ...
So I added the import_array() and all the needed stuff so that it now
compiles. However, when I load the library I obtain :
ImportError: No module named core.multiarray
I didn't find anything on the net about it, what cou
Please ignore if you recieve this.
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Hi,
I'm working with NumPy/SciPy on some algorithms and i've run into some
important speed differences wrt Matlab 7. I've narrowed the main speed
problem down to the operation of finding the euclidean distance
between two matrices that share one dimension rank (dist in Matlab):
Python:
def dtest()
Alexander Belopolsky schrieb:
> In my view it is more important that code is easy to read rather than
> easy to write. Interactive users will disagree, but in programming you
> write once and read/edit forever :).
The insight about this disagreement imho suggests a compromise (or call
it a dual s
Hi,
On Fri, Jun 16, 2006 at 08:28:18AM +0200, Johannes Loehnert wrote:
> Hi,
>
> def dtest():
> A = random( [4,2])
> B = random( [1000,2])
>
> # drawback: memory usage temporarily doubled
> # solution see below
> d = A[:, newaxis, :] - B[newaxis, :, :]
Unless I'm wrong, one
39 matches
Mail list logo