[MMTK] ParticleVectors and __float__ attributes
Alexander D. Wissner-Gross
alexwg at physics.harvard.edu
Mon Sep 18 18:40:25 CEST 2006
Hi Seth,
If you use Numeric 23.8 instead of 24.2 that should fix your problem.
Best,
Alex Wissner-Gross
Dr. Seth Olsen wrote:
>
> Hi MMTKers,
>
> I had a try at working around the error I was getting from
> Subspace.getBasis(), namely:
>
> Traceback (most recent call last):
> File "<stdin>", line 67, in ?
> File "/usr/lib/python2.4/site-packages/MMTK/Subspace.py", line 79, in
> getBasis
> basis = Numeric.array(self.vectors, Numeric.Float)
> AttributeError: ParticleVector instance has no attribute '__float__'
>
> by adding a __float__ attribute to the ParticleVector class as such:
>
> def __float__(self):
> return Numeric.array(self.array,Numeric.Float)
>
> but this doesn't work, giving instead a different error:
> File "<stdin>", line 67, in ?
> File "/usr/lib/python2.4/site-packages/MMTK/Subspace.py", line 79, in
> getBasis
> basis = Numeric.array(self.vectors, Numeric.Float)
> TypeError: nb_float should return float object
>
> This is quite perplexing, as I can't be the first one to run into this
> bug. I'm giving up for the evening. I will try again tomorrow.
>
> Cheers,
>
> Seth
>
>
> ccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccms
>
> Dr Seth Olsen, PhD
> Postdoctoral Fellow, Biomolecular Modeling Group
> Centre for Computational Molecular Science
> Australian Institute for Bioengineering and Nanotechnology (Bldg. 75)
> The University of Queensland
> Qld 4072, Brisbane, Australia
>
> tel (617) 3346 3976
> fax (617) 33654623
> email: s.olsen1 at uq.edu.au <mailto:s.olsen1 at uq.edu.au>
> Web: www.ccms.uq.edu.au <http://www.ccms.uq.edu.au>
>
> ccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccmsccms
> The opinions expressed here are my own and do not reflect the positions
> of the University of Queensland.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mmtk maillist - mmtk at starship.python.net
> http://starship.python.net/mailman/listinfo/mmtk
More information about the mmtk
mailing list