Re: [Numpy-discussion] inconsistent dtype promotion in dimensionless arrays

2007-04-05 Thread Travis Oliphant
Matthew Koichi Grimes wrote:

>I've noticed two dtype promotion behaviors that are surprising to me. 
>I'm hoping to get people's input as to whether I should file bug tickets 
>on them.
>  
>

Short answer:  No, they are not bugs.

The rule is:

In any mixed-type operation between two objects of the same fundamental 
"kind" (i.e. integer, float, complex) arrays always have precedence over 
"scalars"  (where a 0-d array is considered a scalar in this context).

It's a rule whose reason has a long history.


-Travis

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] inconsistent dtype promotion in dimensionless arrays

2007-04-05 Thread Robert Kern
Matthew Koichi Grimes wrote:
> I've noticed two dtype promotion behaviors that are surprising to me. 
> I'm hoping to get people's input as to whether I should file bug tickets 
> on them.
> 
> First weirdness:
> When you do an operation between a float32 Numpy array and a python or 
> Numpy float64, the result is a float32 array, not a float64 array:
> 
>  >>> import numpy as N
>  >>> vec32 = N.ones(2, N.float32)
>  >>> vec32
> array([ 1.,  1.], dtype=float32)
>  >>> result = vec32 - 1.0
>  >>> result.dtype
> dtype('float32')
>  >>> result = vec32 - N.float64(1.0)
>  >>> result.dtype
> dtype('float32')
> 
> 
> This is of course not the case if the float64 is replaced with a 
> 1-dimensional numpy array:
>  >>> result = vec32 - N.array([1.0], N.float64)
>  >>> result.dtype
> dtype('float64')

This is actually expected behavior. The rule is that when an array is operated
with a scalar and the dtypes are of the same kind (floating point, integer,
complex are all different "kinds"; float32 and float64 are of the same kind,
float32 and int32 are not), then the array's dtype takes precedence. This helps
resolve long-standing issues of using float32 arrays and still multiplying them
by 2.0, for example. When the two are of different kinds (float32 and int32, for
example), the common "safe" dtype is negotiated between the two.

> Second weirdness:
> Type promotion doesn't happen if you replace the 1-d, 1-element array 
> with a 0-d array:
> 
>  >>> result = vec32 - N.array(1.0, N.float64)
>  >>> result.dtype
> dtype('float32')
> 
> 
> The second weirdness in particular strikes me as inconsistent when 
> compared to operations between vec32 and the 1-d array.

Rank-0 arrays are treated as scalars in ufuncs, too, so these are consistent.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] inconsistent dtype promotion in dimensionless arrays

2007-04-05 Thread Matthew Koichi Grimes
I've noticed two dtype promotion behaviors that are surprising to me. 
I'm hoping to get people's input as to whether I should file bug tickets 
on them.

First weirdness:
When you do an operation between a float32 Numpy array and a python or 
Numpy float64, the result is a float32 array, not a float64 array:

 >>> import numpy as N
 >>> vec32 = N.ones(2, N.float32)
 >>> vec32
array([ 1.,  1.], dtype=float32)
 >>> result = vec32 - 1.0
 >>> result.dtype
dtype('float32')
 >>> result = vec32 - N.float64(1.0)
 >>> result.dtype
dtype('float32')


This is of course not the case if the float64 is replaced with a 
1-dimensional numpy array:
 >>> result = vec32 - N.array([1.0], N.float64)
 >>> result.dtype
dtype('float64')


Second weirdness:
Type promotion doesn't happen if you replace the 1-d, 1-element array 
with a 0-d array:

 >>> result = vec32 - N.array(1.0, N.float64)
 >>> result.dtype
dtype('float32')


The second weirdness in particular strikes me as inconsistent when 
compared to operations between vec32 and the 1-d array.

I didn't see these listed on the trac site as bugs, but then again a 
bunch of tickets seem to have been removed/fixed recently. Sorry if 
these have been mentioned, filed, and fixed already. Otherwise, should I 
file a ticket on the above behaviors?

-- Matt
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Identification of neighbouring sites for a periodic numpy array

2007-04-05 Thread Bill Baxter
On 4/4/07, Andy Cheesman <[EMAIL PROTECTED]> wrote:
> Hi people,
>
> I was wondering if people could give me a pointer or two upon the
> efficient identification of neighbouring sites for a given point upon a
> numpy array which has periodic conditions.
> Suggestions upon the web I've seen seem to use lots of loops which does
> not seem to be the most economical method.

Neighbors of x[i] in array x with length N are

x[[i-1,i,(i+1)%N]]

The -1 is ok without a guard because x[-1] is the last element of a
list in python.

If that's not what you were after then you might need to be more
specific about the context you're talking about.

> Sorry if this is muppet-ish post!

I do not know what you mean.  You think you sound like Kermit the Frog
or Fozzie Bear?  You do not.  And I think we all know that it really
isn't easy being green.

:-)

--bb
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] question about standalone small software and teaching

2007-04-05 Thread Gael Varoquaux
On Thu, Apr 05, 2007 at 04:24:01PM -0400, Alan G Isaac wrote:
> On Thu, 5 Apr 2007, Gael Varoquaux apparently wrote: 
> > Actually I do it the other way around nowadays. 

> Except in the tutorial?

Yes, shame on me, I changed policy after writing it. I guess I should
correct it. I'll add this to my TODO list.

Gaël
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] how to run the tests.

2007-04-05 Thread Robert Kern
Keith Goodman wrote:
> On 4/5/07, Robert Kern <[EMAIL PROTECTED]> wrote:
>> There have been significant improvements to the Core
>> Duo 2 code in ATLAS releases [snip]
> 
> What kind of speed up are people seeing with Core 2 Duo aware ATLAS?

Oh, and from the first release with Core 2 support:

"""
I just released 3.7.16. There's some misc stuff, but the big news is
that I have added architectural support for the Core2 family (though have
not tuned any assembly for it yet), and this guy is a beast! Looks like
after years of getting schooled by AMD, Intel finally got tired of it.

...

This means Core2 is the fastest floating point x86 ever produced. It ties
the G5, which was previously the best peak performer of any desktop system.
"""

So yeah, we're missing out.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] how to run the tests.

2007-04-05 Thread Robert Kern
Keith Goodman wrote:
> On 4/5/07, Robert Kern <[EMAIL PROTECTED]> wrote:
>> There have been significant improvements to the Core
>> Duo 2 code in ATLAS releases [snip]
> 
> What kind of speed up are people seeing with Core 2 Duo aware ATLAS?

>From the announcements on math-atlas-devel:

"""
3.7.17 is out. It's mainly for Core2Duo. I've got a new double precision
gemm kernel that bumps up performance to roughly 77% of peak for large
GEMM. This kernel also seems faster on Pentium-4 chips, but I haven't
updated any other architecture defaults. I've got a few more experiments
that might speed up the Core2Duo kernel, and I'll wait until the new kernel
is more set before updateing other defaults.

Anyway, if you have a Core2Duo, grab this release for a noticable double
precision speedup.
"""

3.7.19: """
Well, there's a couple of days I'll never see again. However, the new config
can finally (at least for me) successfully build 32/64 bit libs when you
override the compiler default on the configure line (using -b 32 or -b 64).
I think the last of the assembly needed to build the 64-bit Core2 defaults
under OS X have been adapted as well.
"""

"""
I've just released 3.7.29. The big deal is that it has new algorithms
(for real precisions only) that essentially doubles the performance (at least
on the Core2Duo, but should work many places) for long skinny matrices.
I.e., shapes like M=56, N=56, K=20.
"""

"""
OK, it's been a long time coming, but 3.7.30 is out. In it, I have finished
adding the just-in-time copy techniqe to complex GEMM. Some long-K speedup
is possible on some platforms. On some architectures, asymptotic complex
GEMM performance goes up as well. Essentially, if you are on a platform where
real GEMM is faster than complex GEMM, there's a good chance you'll see a
speedup here, though you may have to recompute [c,z]Xover.h to make it
happen (I've updated only the Core2Duo [6% ZGEMM speedup] and Athlon-64
[no speedup] arch defs).
"""


-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] question about standalone small software and teaching

2007-04-05 Thread Alan G Isaac
On Thu, 5 Apr 2007, Gael Varoquaux apparently wrote: 
> Actually I do it the other way around nowadays. 

Except in the tutorial?
But anyway, I'm willing to try anything that gets them moving.
It is true that avoiding the appearance of complexity can
sometimes add complexity.

Cheers,
Alan Isaac




___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] how to run the tests.

2007-04-05 Thread Keith Goodman
On 4/5/07, Robert Kern <[EMAIL PROTECTED]> wrote:
> There have been significant improvements to the Core
> Duo 2 code in ATLAS releases [snip]

What kind of speed up are people seeing with Core 2 Duo aware ATLAS?
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] how to run the tests.

2007-04-05 Thread Robert Kern
Christopher Barker wrote:
> Robert Kern wrote:
>> Yup. I haven't yet been able to build a Universal ATLAS library that works, 
>> so
>> we're stuck with Accelerate.
> 
> Is that a bad thing? It seems like Apple is in the position to do it 
> right, and have a differently tuned version for each of their hardware. 
> If only MS would supply BLAS/LAPACK.
> 
> And aren't they using atlas anyway?

They are, but an older one. There have been significant improvements to the Core
Duo 2 code in ATLAS releases, but no updates to Accelerate.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] how to run the tests.

2007-04-05 Thread Keith Goodman
On 4/5/07, Christopher Barker <[EMAIL PROTECTED]> wrote:
> If only MS would supply BLAS/LAPACK.

Yeah, too bad more people don't use atlas. Then MS would embrace
atlas, extend it, and...I forget the last step.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] how to run the tests.

2007-04-05 Thread Christopher Barker
Robert Kern wrote:
> Yup. I haven't yet been able to build a Universal ATLAS library that works, so
> we're stuck with Accelerate.

Is that a bad thing? It seems like Apple is in the position to do it 
right, and have a differently tuned version for each of their hardware. 
If only MS would supply BLAS/LAPACK.

And aren't they using atlas anyway?

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] how to run the tests.

2007-04-05 Thread Robert Kern
Christopher Barker wrote:
> A question:
> lapack_lite.so is linked against:
>  
> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
> 
> Does that mean the Apple-supplied BLAS/LAPACK is being used?

Yup. I haven't yet been able to build a Universal ATLAS library that works, so
we're stuck with Accelerate.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Big list of Numpy & Scipy users

2007-04-05 Thread Robert Kern
Christopher Barker wrote:
> David L Goldsmith wrote:
>> Sebastian Haase wrote:
>>> Maybe the projects should be in categories:
>>> - open source
>>> - commercial   (?)
>>> - papers
> 
> Maybe we need a section called "organizations" or something.

If you don't think you fit into any of the categories that are there, please,
everyone, feel free to make a new one. You don't need anyone's approval to put
content that you think is accurate onto the Wiki.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] how to run the tests.

2007-04-05 Thread David M. Cooke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christopher Barker wrote:
> Just a quick comment.
> 
> I just built 1.0.2 on my OS-X box, and it took me entirely too long to 
> figure out how to run the tests. I suggest something like:
> 
> ""
> after installing, to run the numpy unit tests, you can run:
> 
> import numpy
> numpy.test()
> """
> 
> be added to the readme after the instructions on how to run setup.py 
> install.

I use python -c 'import numpy; numpy.test()' for that. I've added a note
 to the README.

> A question:
> lapack_lite.so is linked against:
>  
> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
> 
> Does that mean the Apple-supplied BLAS/LAPACK is being used?

Yes; the Accelerate framework exists on all installations of OS X, so we
can use it with no problems.

- --
|>|\/|<
/--\
|David M. Cooke  http://arbutus.physics.mcmaster.ca/dmc/
|[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFU0NN9ixZKFWjRQRAtcKAJ0QOu+A3MdjJfAbcmjyLJ3C2yI7SACeLQXa
dZOkiYWSa2kWZRoUJ/MEFxM=
=EoOZ
-END PGP SIGNATURE-
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] how to run the tests.

2007-04-05 Thread Christopher Barker
Just a quick comment.

I just built 1.0.2 on my OS-X box, and it took me entirely too long to 
figure out how to run the tests. I suggest something like:

""
after installing, to run the numpy unit tests, you can run:

import numpy
numpy.test()
"""

be added to the readme after the instructions on how to run setup.py 
install.

A question:
lapack_lite.so is linked against:
 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate

Does that mean the Apple-supplied BLAS/LAPACK is being used?

-Chris

PS: it seems to be working fine with the Universal Framework build of 
Python2.5. I'll submit a package to be put on the pythonmac repository.


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Big list of Numpy & Scipy users

2007-04-05 Thread Christopher Barker
David L Goldsmith wrote:
> Sebastian Haase wrote:
>> Maybe the projects should be in categories:
>> - open source
>> - commercial   (?)
>> - papers

Maybe we need a section called "organizations" or something. We use 
numpy a lot around here, but, so far, only for small in-house tools that 
we can't point anyone to a web page or anything for.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Big list of Numpy & Scipy users

2007-04-05 Thread Andrew Straw
Bill Baxter wrote:
> On 4/4/07, Robert Kern <[EMAIL PROTECTED]> wrote:
>   
>> Bill Baxter wrote:
>> 
>>> Is there any place on the Wiki that lists all the known software that
>>> uses Numpy in some way?
>>>
>>>   
 It would be nice to start collecting such a list if there isn't one
 
>>> already.  Screenshots would be nice too.
>>>   
>> There is no such list that I know of, but you may start one on the wiki if 
>> you like.
>> 
>
> Ok, I made a start:  http://www.scipy.org/Scipy_Projects
>   
Great idea. I renamed the page to http://www.scipy.org/Projects so
Numpy-only users wouldn't feel excluded.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] F2PY and underscore problem

2007-04-05 Thread Zdeněk Hurák
Robert Kern wrote:

> Zdeněk Hurák wrote:
[...]
>> I want to create Python modules from some Fortran numerical functions
>> that rely on LAPACK. 
[...]
>> However, when trying to import the module, Python cries that there is and
>> undefined symbol: sb02mw_. 
[...]

> What FORTRAN compiler are you using to build the module? What FORTRAN
> compiler was used to build LAPACK?

Sorry for not giving this important detail. I use gcc-4.1.1 compiler suite,
which means that gfortran is used as a Fortran compiler. The same compiler
was used to build Lapack.

Zdenek Hurak

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] question about standalone small software and teaching

2007-04-05 Thread Gael Varoquaux
On Thu, Apr 05, 2007 at 01:36:28PM -0400, Alan G Isaac wrote:
> On Thu, 05 Apr 2007, Christopher Barker apparently wrote: 
> > I think, in a situation when you are intending the class 
> > attribute to be over-ridden by an instance attribute, then 
> > it's clearer to define it as an instance attribute in the 
> > first place: 

> This is true of course.
> BUT I am with Gael on this one:
> when **introducing** newbies to their first class(es),
> it can be useful not to introduce with the __init__ function.

> Remember, for many perfectly intelligent people,
> the phrases 'class object' and 'instance object'
> are no more than 'n o i s e  object'.

Actually I do it the other way around nowadays. I don't talk about class
object, instance object... I simply tell them to create attributes by
putting them in the __init__ . That way I simply avoid the explaination
until they actually need class attributes. By the time they need these
they are flying with their own wings.

When I would do it the other way around they would trip on the issue,
eventually, and than I would have to give the explaination, and this has
always been a difficult moment.

Gaël
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] question about standalone small software and teaching

2007-04-05 Thread Alan G Isaac
On Thu, 05 Apr 2007, Christopher Barker apparently wrote: 
> I think, in a situation when you are intending the class 
> attribute to be over-ridden by an instance attribute, then 
> it's clearer to define it as an instance attribute in the 
> first place: 

This is true of course.
BUT I am with Gael on this one:
when **introducing** newbies to their first class(es),
it can be useful not to introduce with the __init__ function.

Remember, for many perfectly intelligent people,
the phrases 'class object' and 'instance object'
are no more than 'n o i s e  object'.

Of course, shortly thereafter you should clear all this up.
But one step at a time when tutoring/teaching ...

Cheers,
Alan Isaac




___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Big list of Numpy & Scipy users

2007-04-05 Thread Ray S
How's this, for under Applications?

CV-mini
The CV-mini is a signal analyzer written in Python, NumPy, and 
wxPython.
It is a high-speed, general-purpose, multi-channel FFT instrument 
available in 3 versions (so far).

Link: http://cognitivevision.com/CVmini.htm

Which reminds me, we should add Python & NumPy credits on the page!

The newest products do not have their pages up, yet...

I don't have a user account on the wiki, so
if: someone else wants to add it, please do.
else: I could sign up.

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] F2PY and underscore problem

2007-04-05 Thread Robert Kern
Zdeněk Hurák wrote:
> I am sorry to come up with a question that probably has been asked and
> answered many times but I honestly searched for an answer but failed to
> find one.
> 
> I want to create Python modules from some Fortran numerical functions that
> rely on LAPACK. I start with a function SB02MD.f that provides a solver for
> algebraic Riccati equation (ARE) that can be obtained at
> http://www.slicot.de/. I proceeded the standard f2py way:
> 
> f2py SB02MD.f -m are -h are1.pyf
> 
> modified are1.pyf (saved as are.pyf) to tell which arguments are inputs and
> outputs and compiled the module:
> 
> f2py -c are.pyf SB02MD.f --link-lapack_opt
> 
> However, when trying to import the module, Python cries that there is and
> undefined symbol: sb02mw_. The same situation if I omit --link-lapack_opt.

What FORTRAN compiler are you using to build the module? What FORTRAN compiler
was used to build LAPACK?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Big list of Numpy & Scipy users

2007-04-05 Thread David L Goldsmith
Sebastian Haase wrote:
> Maybe the projects should be in categories:
> - open source
> - commercial   (?)
> - papers
> - ??
>   
I agree: I'm using numpy in two of my projects, but these are likely to 
have a small, specialized and self-contained user base indefinitely, so 
I'm a little "shy" about throwing them in to a general mix which 
includes large many-user projects and thereby making them seem, perhaps, 
"grander" than they are.  So at least one additional category: "small" 
projects.

DG
> -Sebastian
>
>
>
>
> On 4/4/07, Bill Baxter <[EMAIL PROTECTED]> wrote:
>   
>> On 4/4/07, Robert Kern <[EMAIL PROTECTED]> wrote:
>> 
>>> Bill Baxter wrote:
>>>   
 Is there any place on the Wiki that lists all the known software that
 uses Numpy in some way?

 
> It would be nice to start collecting such a list if there isn't one
>   
 already.  Screenshots would be nice too.
 
>>> There is no such list that I know of, but you may start one on the wiki if 
>>> you like.
>>>   
>> Ok, I made a start:  http://www.scipy.org/Scipy_Projects
>> Anyone who has a project that depends on Numpy or Scipy, please go add
>> your info there!
>>
>> I haven't linked it from anywhere, because it looks pretty pathetic
>> right now with only three or four entries.  But hopefully everyone
>> will jumps in and add their project to the list.
>>
>> Part of the idea is that this should be a good place to point
>> nay-sayers to when they say "meh - numpy... that's a niche project for
>> a handful of scientists."
>>
>> So ... hopefully a good portion of the links will be things other than
>> science projects.  There will hopefully be a lot of things that
>> "ordinary users" would care about.  :-)
>>
>> I couldn't figure out how to add an image, but if someone knows how to
>> do that, please do.
>>
>> --bb
>> ___
>> Numpy-discussion mailing list
>> Numpy-discussion@scipy.org
>> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>>
>> 
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>   


-- 
ERD/ORR/NOS/NOAA 
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] numpy-1.0.2 installation error

2007-04-05 Thread Travis Oliphant
Myhuong Nguyen wrote:

>Hi,
> 
>I have tried to install numpy-1.0.2 on my SGI (irix6.5) using command
>"python setup.py install" and received the following error message:
>
>File "numpy/core/setup.py", line 48, in generate_config_h
>  raise "ERROR: Failed to test configuration"
>ERROR: Failed to test configuration
>
>What does the message mean? and how to fix it?
>  
>
It means that something is going wrong during the configuration stage.   
We need help getting numpy to build on your hardware. 

This means getting the right config.h file generated.  We can start by 
manually creating a config.h file that works for your platform and then 
figuring out how to get it written.

This configuration file just defines various variables depending on 
whether or not your platform (combination of hardware and compiler) has 
various functions, has various types defined, and what the sizes of 
different types are on your platform.

It usually takes somebody with that hardware to get it fixed.  Are you 
willing to help?

-Travis

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] numpy-1.0.2 installation error

2007-04-05 Thread Charles R Harris

On 4/4/07, Myhuong Nguyen <[EMAIL PROTECTED]> wrote:


Hi,

I have tried to install numpy-1.0.2 on my SGI (irix6.5) using command
"python setup.py install" and received the following error message:

File "numpy/core/setup.py", line 48, in generate_config_h
  raise "ERROR: Failed to test configuration"
ERROR: Failed to test configuration

What does the message mean? and how to fix it?



This isn't an answer to your question, but another build error on
irix6.5was reported as ticket 417, so maybe you can help us get numpy
building on
those machines. What compiler/hardware are you using?

Chuck
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] question about standalone small software and teaching

2007-04-05 Thread Christopher Barker
Gael Varoquaux wrote:
> I have recently
> started avoided using class attributes when not necessary,

I agree. I use class attributes when I need, well, class attributes. 
That is an attribute that is shared by all the instances of the class.

In fact, in the example:

class A:
x = 4

A_instance = A()

A_instance.x = 10

A.x is NOT the class attribute, it is now an instance attribute, which 
is found before the still existing class attribute A.x. Yes, the class 
attribute can serve as a default, but, I think, in a situation when you 
are intending the class attribute to be over-ridden by an instance 
attribute, then it's clearer to define it as an instance attribute in 
the first place:

class A:
 def __init___(self, ...)
 self.x = 4

Even though it's more typing.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-user] Big list of Numpy & Scipy users

2007-04-05 Thread oliver . tomic
Hi list,

I've put out our project on the scipy project site.

Hopefully, this will become a very long list.

Oliver

[EMAIL PROTECTED] wrote on 05.04.2007 04:10:28:

> On 4/4/07, Robert Kern <[EMAIL PROTECTED]> wrote:
> > Bill Baxter wrote:
> > > Is there any place on the Wiki that lists all the known software that
> > > uses Numpy in some way?
> > >
> >> > It would be nice to start collecting such a list if there isn't one
> > > already.  Screenshots would be nice too.
> >
> > There is no such list that I know of, but you may start one on the
> wiki if you like.
>
> Ok, I made a start:  http://www.scipy.org/Scipy_Projects
> Anyone who has a project that depends on Numpy or Scipy, please go add
> your info there!
>
> I haven't linked it from anywhere, because it looks pretty pathetic
> right now with only three or four entries.  But hopefully everyone
> will jumps in and add their project to the list.
>
> Part of the idea is that this should be a good place to point
> nay-sayers to when they say "meh - numpy... that's a niche project for
> a handful of scientists."
>
> So ... hopefully a good portion of the links will be things other than
> science projects.  There will hopefully be a lot of things that
> "ordinary users" would care about.  :-)
>
> I couldn't figure out how to add an image, but if someone knows how to
> do that, please do.
>
> --bb
> ___
> SciPy-user mailing list
> [EMAIL PROTECTED]
> http://projects.scipy.org/mailman/listinfo/scipy-user

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] numpy-1.0.2 installation error

2007-04-05 Thread Myhuong Nguyen
Hi,
 
I have tried to install numpy-1.0.2 on my SGI (irix6.5) using command
"python setup.py install" and received the following error message:

File "numpy/core/setup.py", line 48, in generate_config_h
  raise "ERROR: Failed to test configuration"
ERROR: Failed to test configuration

What does the message mean? and how to fix it?

Many thanks in advance.

Myhuong Nguyen

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Identification of neighbouring sites for a periodic numpy array

2007-04-05 Thread Andy Cheesman
Hi people,

I was wondering if people could give me a pointer or two upon the
efficient identification of neighbouring sites for a given point upon a
numpy array which has periodic conditions.
Suggestions upon the web I've seen seem to use lots of loops which does
not seem to be the most economical method.

Sorry if this is muppet-ish post!

Andy
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] [ANN] EuroPython 2007: Call for Proposals

2007-04-05 Thread Nicolas Chauvat
Book Monday 9th July to Wednesday 11th July 2007 in your calendar!
EuroPython 2007, the European Python and Zope Conference, will be held in
Vilnius, Lithuania.  Last year's conference was a great success, featuring
a variety of tracks, amazing lightning talks and inspiring keynotes.  With
your participation, we want to make EuroPython 2007, the sixth EuroPython,
even more successful than the previous five.

Talks, Papers and Themes


This year we have decided to borrow a few good ideas from PyCon, one of
which is to move away from the 'track' structure.  Instead, speakers are
invited to submit presentations about anything they have done that they
think would be of interest to the Python community.  We will then arrange
them into related groups and schedule them in the space available.  In the
past, EuroPython participants have found the following themes to be of
interest:

 * Science
 * Python Language and Libraries
 * Web Related Technologies
 * Education
 * Games
 * Agile Methodologies and Testing
 * Social Skills

In addition to talks, we will also accept full paper submissions about any
of the above themes.  The Call for Refereed Papers will be posted shortly.

The deadline for talk proposals is Friday 18th May at midnight (24:00
CEST, Central European Summer Time, UTC+2).

Other ways to participate
-

Apart from giving talks, there are plenty of other ways to participate in
the conference.  Just attending and talking to people you find here can be
satisfying enough, but there are three other kinds of activity you may wish
to plan for: Lightning Talks, Open Space and Sprints.  Lightning Talks are
very short talks that give you just enough time to introduce a topic or
project, Open Space is an area reserved for informal discussions, and
Sprints are focused gatherings for developers interested in particular
projects.  For more information please see the following pages:

 * Lightning Talks: http://www.europython.org/sections/events/lightning_talks
 * Open Space: http://www.europython.org/sections/events/open_space
 * Sprints: http://www.europython.org/sections/sprints_and_wiki

Your Contribution
-

To propose a talk or a paper, go to...

 * http://www.europython.org/submit

For more general information on the conference, please visit...

 * http://www.europython.org/

Looking forward to seeing what you fine folk have been up to,

The EuroPython Team

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] F2PY and underscore problem

2007-04-05 Thread Zdeněk Hurák
I am sorry to come up with a question that probably has been asked and
answered many times but I honestly searched for an answer but failed to
find one.

I want to create Python modules from some Fortran numerical functions that
rely on LAPACK. I start with a function SB02MD.f that provides a solver for
algebraic Riccati equation (ARE) that can be obtained at
http://www.slicot.de/. I proceeded the standard f2py way:

f2py SB02MD.f -m are -h are1.pyf

modified are1.pyf (saved as are.pyf) to tell which arguments are inputs and
outputs and compiled the module:

f2py -c are.pyf SB02MD.f --link-lapack_opt

However, when trying to import the module, Python cries that there is and
undefined symbol: sb02mw_. The same situation if I omit --link-lapack_opt.

The famous underscore problem. Perhaps important information is that I am on
Linux and experience this problem both with lapack-atlas and
lapack-reference libraries. Why I am so focused on Lapack? Some other
examples for f2py that do not need Lapack work well here.  

Even though Google gives miriad of links for "f2py underscore" problem, I
failed to find the one that is relevant for me. I played with the options
like -DUNDERSCORE_G77 and -DNO_APPEND_FORTRAN but no help and I actually do
not understand their use at all (not explained in man for f2py).

Thanks for whatever hint/advice.


-- 

Zdenek Hurak
Czech Technical University in Prague


___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nd_image.affine_transform edge effects

2007-04-05 Thread Stefan van der Walt
Hi James

On Wed, Apr 04, 2007 at 08:29:50PM -0400, James Turner wrote:
>  > It looks like the last output value is produced by reflecting the
>  > input and then interpolating, but presumably then the first value
>  > should be 3.9, for consistency, not 3.1? Does that make sense?
> 
> Aargh. I think I see what's happening now. The input is supposed to
> be interpolated and then reflected like this:
> 
>   [4  3  2  1]  ->  [3.1  3.1  2.1  1.1  1.1]
> 
> The problem is that there is still one value too many being
> "interpolated" here before the reflection takes place. Do the
> sections beginning at lines 168 & 178 need changing in a similar way
> to their counterparts at lines 129 & 139? I started looking into
> this, but I don't understand the code well enough to be sure I'm
> making the right changes...

Thanks for spotting that.  When I fix those lines, I see:

[[ 3.901   3.099   2.099   1.1002  1.8998  2.901 ]
 [ 3.901   3.099   2.099   1.1002  1.8998  2.901 ]]

I'll submit to SVN later today.  Note that I also enabled 'mirror'
mode, which works almost the same way as reflect:

Reflect: 1 2 3 4 -> 1 2 3 4 4 3 2 1
Mirror:  1 2 3 4 -> 1 2 3 4 3 2 1

Cheers
Stéfan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion