I sent the following email to Paul Dubois. Since he is not familiar with
he suggested that I send my problem to this list. In short, I am unable to
get the pyfdemo
to work in pyfort_8_.2 using python2.2 because my FORTRAN compiler, COMPAQ/DEC
Visual FORTRAN uses NMAKE.EXE rather than make. When I try to run the demo,
I get an error message saying that make is not recognized. What file or
file(s) should I
change. I cannot run under LINUX, it must be WINDOWS2000.
Thanks for your assistance,
>Date: Wed, 16 Oct 2002 13:26:27 -0700
>Subject: RE: Problem with pyfort
>To: "Don Blackfield" <blackfield1(a)llnl.gov>
>There is a subdirectory of the source that is devoted to how to do things
>on Microsoft. I don't have any experience of it myself. You can try the
>numpy-discussion(a)lists.sf.net list if you want to contact other users.
> >-- Original Message --
> >Date: Wed, 16 Oct 2002 12:10:54 -0700
> >To: "Paul F Dubois" <paul(a)pfdubois.com>
> >From: Don Blackfield <blackfield1(a)llnl.gov>
> >Subject: Problem with pyfort
> > Paul,
> > You may be cursing Microsoft by now, I know that I am. I have
> >"successfully" installed pyfort. However,
> >when I try to run the pyfdemo script by typing
> >pyfort.bat -i pyfdemo
> >it begins to work. However it crashes because WINDOWS does not recognize
> >make. The COMPAQ/DEC/Visual
> >Fortran uses a similar routine called NMAKE.EXE . Is there some place in
> >some file(s) where I need to change
> >make to NMAKE.EXE ??
> > Sorry for the hassle.....
Donald T. Blackfield
Fusion Energy Program
New Technologies Engineering Division
Lawrence Livermore National Laboratory
P.O. Box 808, MailStop L-641
Livermore, CA 94550
(925)422-0496 / (925)422-7390 (fax)
On Tue, 15 Oct 2002 12:22:27 -0700
> Numpy-discussion -- confirmation of subscription -- request 961098
> We have received a request from 220.127.116.11 for subscription of your
> email address, <retype(a)terra.com.br>, to the
> numpy-discussion(a)lists.sourceforge.net mailing list. To confirm the
> request, please send a message to
> numpy-discussion-request(a)lists.sourceforge.net, and either:
> - maintain the subject line as is (the reply's additional "Re:" is
> - or include the following line - and only the following line - in the
> message body:
> confirm 961098
> (Simply sending a 'reply' to this message should work from most email
> interfaces, since that usually leaves the subject line in the right
> If you do not wish to subscribe to this list, please simply disregard
> this message. Send questions to
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: VirusScan / Atualizado em 09/10/2002 / Versão: 1.3.13
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
As a help for me learning Dyadic vector analysis, I have been working on
a Numpy class for manipulating Dyads. I am wondering if anyone else has
any similar interests. Most of the impetus for the work comes from
"Methods for Electromagnetic Field Analysis" by Ismo Lindell. In
numerous searches I found no computer code dealing with Dyads.
My biggest stumbling block so far is integrating the symbolism of Dyadic
analysis into something understandable. Operator overloading isn't
going to help me. For example in my program:
A=dyad(a,b) where a and b are complex vectors
A.dmmd(B) is equivalent to double dyadic multiplication of the dyads A
and B. :) In a book this would be written something like A xx B
except that the x's would be aligned vertically.
Ok, its an insane project. Rob.
The Numeric Python EM Project
i am writing a class called communicate. Something like this:
""" This is the main communicate class : there will be more
"""This should hopefully read a file and set self's parameters
self.C = 10
self.K = 6
self.N = 8
self.Na = 3
self.L = 4
self.modulation = "QPSK"
1. Shown is just one method in the class. Now there are lot of self
variables (i understand they are something like private variables). Now i
want to have an .ini file, so that i call something like this in the
__init__ module :
def __init__(self, fileName):
file = open(fileName, 'r')
self = something(file)
and all the self's variables are set. i want the ini file to be the
interface between the class and the outside world. Some one suggested
ConfigParser , couldnt get an idea of what it is and how to use it..
2. Is this method of having all the data in self variables good.The size
of some of these 'self' could be very high 40000x40000 complex. Should i
create local variables in the methods (i need a lot of variables, but
their def life is too small .....)
for example one of the method could be:
""" Generates AWGN
power = Numeric.sqrt(RandomArray.random()*10)
Noise = Numeric.zeros(....)
Noise.real = Random ......
Noise.imag = RandomArray....
(Boared to type the whole thing that is why there are ......'s )
Any way power is a local variable, which i guess dies after
generateNoise() method is called in the object. Am i right..
Can i have variables like 'power'
3. Thirdly, i want an easy method like '.mat' that exists in matlab. Can i
use pickle (cPickle or Numeric.pickle) to store all the variables that i
want. These matrices could be 40000x40000 entries long. Assuming that all
the variables are in 'self' should i write an assignment module before
pickling them (in case pickle is the right way to store these variables)
Na = self.Na
x = self.x
pickle the variables Na, x
Thankx in advance and in anticipation,
PS: slowly moving from Matlab to Python, hence these stupid doubts
Karthikesh Raju, email: karthik(a)james.hut.fi
Helsinki University of Technology, Tel: +358-9-451 5389
Laboratory of Comp. & Info. Sc., Fax: +358-9-451 3277
Department of Computer Sc.,
P.O Box 5400, FIN 02015 HUT,
We're currently porting several of our boost-wrapped Numeric classes
to numarray. The routines are spread across several cpp files, and
**libnumarray_API is needed in each file. In Numeric, we invoke
import_array() in the module file, to initialize **PyArray_API, and
def NO_IMPORT_ARRAY in the other files; this produces
extern void **PyArray_API in those files, and everyone's happy.
Currently libnumarray.h doesn't implement this -- is there
another way to compile a multiple file project which
initializes the API just once?
Thanks, Phil Austin
The subject line contains what I consider to be an invalid range
expression. Numarray, now and always, reacts badly to it. Currently,
numarray tries to allocate a multi-gigabyte array. In the past, it has
The question is, what should it do?
1. raise ValueError, "Invalid negative range expression" (my +1)
2. zeros((0,), 'l')
(Numeric does this)
Is there a good justification to keep the existing Numeric behavior?
Any other suggestions?
I've been lurking for a while, and using Numeric for about 5-6 months. I
submitted a bug report about two months ago
regarding incorrect underflow behavior in exp().
I'd really like to get that fixed, nobody else seems to be working on it,
and so I checked out the CVS tree. From reading the API section of the
manual, I can see that unary ufuncs are driven by PyUFunc_FromFuncAndData()
and that exp already has check_return set to 1, so that it should clean up
rank-0 arrays, and raise the appropriate Python exception when 'errno' is
set by a math error.
I'd like to take a closer look into things, and one way of doing that would
be to use a unit-test suite, but it's not obvious where that is (if at all)
in the source distribution. Is there one?
Another way to look into it would be if I could write some C code, then
drop into Numeric's code and track what's going on when I call exp() for
arguments that underflow. Is there a harness out there that I could just
adapt to my own needs. Surely that's how other developers do it. If not,
how *do* you fix bugs?
I've already added some features to JNumeric, and introduced a unit-test
suite there. I have so few problems using Numeric, I'd really like to nail
this one involving exp(), since it's holding me back.
PhD, Computational Biologist,
Harvard Medical School BCMP/SGM-322, 250 Longwood Ave, Boston MA 02115, USA.
Tel: 617-432-3555 Fax:
Could someone explain the reason why int() and float() don't work as
ufuncs? Is it just that someone needs to write the code, or is there some
subtlety at work that I am missing?
It took a bit of digging to go find the fact that what I wanted is
newarray = oldarray.astype(MagicNewTypeCode)
Nils Wagner wrote:
>I tried to install numarray via latest CVS. However
>python setup.py install failed
>This is the output
>Src/_ndarraymodule.c:240: warning: `_ndarray_bytestride_set' defined but
>not use d
>Src/_ndarraymodule.c:260: warning: `_ndarray_byteoffset_get' defined but
>not use d
>Src/_ndarraymodule.c:266: warning: `_ndarray_byteoffset_set' defined but
>not use d
>Src/_ndarraymodule.c:288: warning: `_ndarray_aligned_get' defined but
>Src/_ndarraymodule.c:294: warning: `_ndarray_aligned_set' defined but
>Src/_ndarraymodule.c:323: warning: `_ndarray_contiguous_get' defined but
>not use d
>Src/_ndarraymodule.c:329: warning: `_ndarray_contiguous_set' defined but
>not use d
>error: command 'gcc' failed with exit status 1
>Any suggestion ?
I'm in the process of merging some new C basetypes into the head of CVS
so I guess the HEAD has to be considered unstable for the next few days.
I work hard to keep the CVS in working order, but you've caught me in
the middle of "something big". For now, I have this advice:
1. Use numarray-0.3.6 until numarray-0.4 is released.
2. When upgrading numarray, always remove the old version.
3. If you're intereseted in writing extensions, stick with numarray's
Numeric compatability API.
Todd Miller jmiller(a)stsci.edu
STSCI / SSB