Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.wiretrip.org!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.073 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'accessible': 0.05; 'received:localnet': 0.07; 'prefix': 0.09; 'url:code': 0.11; 'am,': 0.14; 'wrote:': 0.14; 'andreas': 0.16; 'module?': 0.16; 'namespace?': 0.16; 'numpy': 0.16; 'otoh,': 0.16; 'in:': 0.16; 'importing': 0.19; 'modules': 0.20; 'writes:': 0.20; 'cc:2**0': 0.20; 'cheers,': 0.20; 'header:In-Reply-To:1': 0.22; '(and': 0.22; 'curious': 0.23; 'classes': 0.26; 'looks': 0.28; 'thanks': 0.29; 'class': 0.29; 'explicitly': 0.29; 'does': 0.31; 'import': 0.32; 'page.': 0.32; 'to:addr:python-list': 0.32; 'skip:e 20': 0.33; 'cross': 0.33; 'array': 0.33; 'module': 0.33; 'operations': 0.33; 'reference': 0.34; 'using': 0.34; 'there': 0.35; 'header:User- Agent:1': 0.35; 'module.': 0.35; 'rather': 0.36; 'received:au': 0.36; 'addition,': 0.37; 'refer': 0.37; '20,': 0.38; 'affects': 0.38; 'apr': 0.38; 'url:google': 0.38; 'url:org': 0.38; 'docs': 0.39; 'somewhat': 0.39; 'url:au': 0.39; 'to:addr:python.org': 0.39; 'could': 0.39; 'how': 0.39; 'works': 0.40; 'basic': 0.40; 'would': 0.40; 'might': 0.40; 'bottom': 0.60; 'give': 0.61; 'header:Message-Id:1': 0.62; '2011': 0.62; 'url:net': 0.62; 'manner': 0.63; 'url:p': 0.63; 'dot': 0.68; 'impressed': 0.68; 'thursday': 0.68; 'requiring': 0.69; 'attention.': 0.73; 'products.': 0.79; '"standard"': 0.84; 'algebra': 0.84; 'mention.': 0.84; 'risky': 0.84 From: Algis Kabaila Organization: PCUG - Users Helping Users To: python-list@python.org Subject: Re: Vectors Date: Thu, 21 Apr 2011 17:25:01 +1000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic-pae; KDE/4.5.1; i686; ; ) References: <053fd9a1-f829-4777-a6ad-32ea4b22789a@r4g2000prm.googlegroups.com> <654D9D97DA51AD479973BC2D5578603C0BE3C05BAD@PDC-MAIL-CMS01.ubisoft.org> In-Reply-To: <654D9D97DA51AD479973BC2D5578603C0BE3C05BAD@PDC-MAIL-CMS01.ubisoft.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 57 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303370708 news.xs4all.nl 41114 [::ffff:82.94.164.166]:33742 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3771 On Thursday 21 April 2011 01:49:57 Andreas Tawn wrote: > > On Apr 20, 6:43 am, Andreas Tawn wrote: > > > > Algis Kabaila writes: > > > > > Are there any modules for vector algebra (three > > > > > dimensional vectors, vector addition, subtraction, > > > > > multiplication [scalar and vector]. Could you give > > > > > me a reference to such module? > > > > > > > > NumPy has array (and matrix) types with support for > > > > these basic operations you mention. See the tutorial > > > > athttp://numpy.scipy.org/ > > > > > > You might also want to > > > considerhttp://code.google.com/p/pyeuclid/ > > > > > > Cheers, > > > > > > Drea > > > > Pyeuclid docs don't mention dot or cross products. > > RJB > > http://partiallydisassembled.net/euclid/vector-classes.html#S > ECTION002220000000000000000 > > Bottom of the page. > > Cheers, > > Drea Yes, pyeuclid had "cross" and "dot" product of vectors. I am impressed with it and curious how it works: the Vector3 class is available without any prefix euclid: import euclid v = Vector3(111.., 222.2, 333.3) works without requiring as in: v = euclid.Vector3( etc...) I am really intrigued by that. OTOH, I also am somewhat aprehensive about using something that affects the program writing after importing "euclid", without any need to explicitly refer to euclid. Looks rather risky to me. What does that do to the namespace? Thanks for bringing this to my attention. I confess that I would be hapier if euclid was accessible in a "standard" manner with prefix of module name for classes in the module. OldAl. -- Algis http://akabaila.pcug.org.au/StructuralAnalysis.pdf