473,748 Members | 8,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Numarray, numeric, NumPy, scpy_core ??!!

J
Hi

I hope the title of this message indicates my question. I am looking
for basic
array functionality in Python and it turns out that there are all these
packages which
are somehow related. Some are allegedly discontinued but still seem to
get updated. Could we start a discussion about which package will or
may or should survive ?

I started to use numarray, but I have a bug that I just cannot find a
solution for, so I started
to look around again. Basically I want to provide scripting support to
a graphics engine. All the
matrices and vectors are in C++ and all I want to do is provide an
interface to python. As a matter of fact, all of the matrix
multiplication etc, could remain in the native C++ code, but I need a
way to extend the python language with the array data type and somehow
intercept operator calls such as *,+,- ....

How is that done in the current libraries... Thx for any help.
Cheers
Jochen

Jan 21 '06
22 2005
On Sat, 21 Jan 2006, Travis E. Oliphant wrote:
J wrote:
I will just jump in an use NumPy. I hope this one will stick and evolve
into the mother of array packages. How stable is it ? For now I really
just need basic linear algebra. i.e. matrix multiplication, dot, cross
etc


There is a new release coming out this weekend. It's closer to 1.0 and
so should be more stable. It also has some speed improvements in
matrix-vector operations (if you have ATLAS BLAS --- or if you download
a binary version with ATLAS BLAS compiled in). I would wait for it.


Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs?

tom

--
It's the 21st century, man - we rue _minutes_. -- Benjamin Rosenbaum
Jan 21 '06 #11
Tom Anderson wrote:
Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs?


Yes.

--
Robert Kern
ro*********@gma il.com

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jan 21 '06 #12
"J" <js****@cs.uvic .ca> writes:
I hope the title of this message indicates my question. I am looking
for basic
array functionality in Python and it turns out that there are all these
packages which
are somehow related. Some are allegedly discontinued but still seem to
get updated.


It's well explained in the homepage: numpy.scipy.org
AFAIK you should use numpy for future use.

--
Lawrence - http://www.oluyede.org/blog
"Anyone can freely use whatever he wants but the light at the end
of the tunnel for most of his problems is Python"
Jan 22 '06 #13
On Sat, 21 Jan 2006, Robert Kern wrote:
Tom Anderson wrote:
Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs?


Yes.


Excellent, thanks.

tom

--
forget everything from school -- you are programmer
Jan 22 '06 #14

Robert Kern wrote:
J wrote:
I will just jump in an use NumPy. I hope this one will stick and evolve
into the mother of array packages.
How stable is it ? For now I really just need basic linear algebra.
i.e. matrix multiplication, dot, cross etc


Same concern for me.

I discovered recently that I could not rely on numeric anymore
because 'eigenvalue' is now broken on my platform. This bug
has been referenced but not corrected AFAIK. Too bad that
numeric is not actively maintained anymore. Easy-to-install,
good doc, well-thought interface, really good stuff !

Bye-bye Numeric !

By the way, I tried numpy 0.9.4 10 minutes ago and guess
what ? 'eigenvalue' is broken too ... (hangs forever)

I do really hope the numpy will become the robust, best-of-breed
Python Array/Matrix lib that many people are waiting for. But in
the meantime, it's back to Matlab :(

SB

Jan 22 '06 #15
Sébastien Boisgérault wrote:
By the way, I tried numpy 0.9.4 10 minutes ago and guess
what ? 'eigenvalue' is broken too ... (hangs forever)


On what platform? Are you linking against an optimized BLAS? We can't fix
anything without details. I'll be happy to work with you on this bug over on the
numpy-discussion list.

--
Robert Kern
ro*********@gma il.com

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jan 22 '06 #16
Basically all I need is vectors and 3x3 matrices.


hmm
is numpy really efficient for 3x3 (or 4x4) matrices and vectors?

IMHO an optimized matrix4x4 class can be much faster (i'm just guessing
here)

eg cgtypes is a simple c++ implementation with boost-python wrapper:
http://cgkit.sourceforge.net/

Jan 22 '06 #17
Szabolcs Nagy wrote:
Basically all I need is vectors and 3x3 matrices.

hmm
is numpy really efficient for 3x3 (or 4x4) matrices and vectors?

IMHO an optimized matrix4x4 class can be much faster (i'm just guessing
here)

eg cgtypes is a simple c++ implementation with boost-python wrapper:
http://cgkit.sourceforge.net/


If you're operating on a single 3x3 or 4x4 matrix, nothing you do in
Python will be "efficient" , by which I assume you mean not all that far
from C speed; the interpreter overhead is simply too high. If you can
operate on large blocks of small arrays and vectors at the same time,
which one can usually do after consuming sufficient coffee, then yes
numpy can be fast if you're careful.

-tim

Jan 22 '06 #18

Robert Kern wrote:
Sébastien Boisgérault wrote:
By the way, I tried numpy 0.9.4 10 minutes ago and guess
what ? 'eigenvalue' is broken too ... (hangs forever)


On what platform? Are you linking against an optimized BLAS? We can't fix
anything without details. I'll be happy to work with you on this bug overon the
numpy-discussion list.


This is a guess, but the original poster is probably using one of the
newer (3.4.x or 4.0.x) versions of gcc. This is a known problem:
https://bugzilla.redhat.com/bugzilla....cgi?id=138791
(that's one of the applicable bug reports).

A workaround to this problem is to add the option '-ffloat-store' to
your CFLAGS.

<insert "gcc 4.0 is such a disaster" rant here>

-greg

Jan 23 '06 #19
Robert Kern wrote:
Sébastien Boisgérault wrote:
By the way, I tried numpy 0.9.4 10 minutes ago and guess
what ? 'eigenvalue' is broken too ... (hangs forever)
On what platform?

Linux, Mandriva 2006 (gcc 4.0.1, etc.) Are you linking against an optimized BLAS? Nope -- I tried the basic install.
We can't fix
anything without details. Obviously, sorry. I was not really expecting a fix,
just wanted to point out that Numpy (or Numeric)
may well not work "out of the box" today on some
platforms.

The (similar) problem has been reported (2005-07-11)
is not assigned to anybody and is still open
See: http://sourceforge.net/tracker/?grou...69&atid=101369
I'll be happy to work with you on this bug over on the
numpy-discussion list.
Great Robert, I will follow your advice then. Thanks
for the proposal. --
Robert Kern
ro*********@gma il.com

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter.


Jan 23 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1477
by: Colin J. Williams | last post by:
numarray is a package which is under development and intended to replace Numeric, an efficient and operational package. One of the classes in numarray is NumArray. As currently implemented, instances of this class are instantiated using factory functions. This appears to restrict the sub-classing of NumArray Examples: a sub-class Matrix, an array restricted to two dimensions, or a sub-class Mix, which combines the NumArray with...
2
2965
by: Marc Schellens | last post by:
Following the NumPy documentation, I took over some C code, but run into an error. Does anybody have a suggestion? Thanks, marc gdlpython.cpp:225: `PyArray_Type' undeclared (first use this function) #include <python2.3/Python.h>
11
1988
by: grv | last post by:
So it is supposed to be very fast to have an array of say 5 million integers stored in a binary file and do a = numarray.fromfile('filename', (2, 2, 2)) numarray.add(a, 9, a) but how is that faster than reading the entire file into memory and then having a for loop in C: (loop over range) { *p++ += 9 }
10
2242
by: Bryan | last post by:
hi, what is the difference among numeric, numpy and numarray? i'm going to start using matplotlib soon and i'm not sure which one i should use. this page says, "Numarray is a re-implementation of an older Python array module called Numeric" http://www.stsci.edu/resources/software_hardware/numarray
0
1997
by: robert | last post by:
just a note - some speed comparisons : 0.60627370238398726 0.42836673376223189 0.36965815487747022 0.016557970357098384 0.15692469294117473 0.01951756438393204
4
3379
by: Christian Convey | last post by:
I need to bang out an image processing library (it's schoolwork, so I can't just use an existing one). But I see three libraries competing for my love: numpy, numarray, and numeric. Can anyone recommend which one I should use? If one is considered the officially blessed one going forward, that would be my ideal. Thanks, Christian
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.