Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93604

Re: How to construct matrix from vectors?

From Tony the Tiger <tony@tiger.invalid>
Subject Re: How to construct matrix from vectors?
Newsgroups comp.lang.python
References <mm55le$4sj$1@speranza.aioe.org>
Message-ID <7LAnx.3610$JE3.250@fx44.am4> (permalink)
Organization Easynews - www.easynews.com
Date 2015-07-09 20:23 +0000

Show all headers | View raw


On Sat, 20 Jun 2015 20:57:04 -0500, Nasser M. Abbasi wrote:

> import numpy as np v1=np.array([1,2,3]); v2=np.array([4,5,6]);
> v3=np.array([7,8,9]); v4=np.array([10,11,12]);
> 
> And now I get stuck, I tried
> 
> m=np.array([[v1,v2],[v3,v4]])  #no good

Not exactly sure what it is you want help with, as the answer is in the 
left column of that page you provided the link to.

You can also lose the semicolons. Not needed in Python, other than in 
very special circumstances. More often than not, they're just confusing 
things, IMO.


 /Grrr
-- 
          ___                  ___
 (\_--_/)  | _ ._    _|_|_  _   |o _  _ ._
 ( 9  9 )  |(_)| |\/  |_| |(/_  ||(_|(/_|
 stripes are forever - as overripe ferrets

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How to construct matrix from vectors? "Nasser M. Abbasi" <nma@12000.org> - 2015-06-20 20:57 -0500
  Re: How to construct matrix from vectors? MRAB <python@mrabarnett.plus.com> - 2015-06-21 03:20 +0100
    Re: How to construct matrix from vectors? "Nasser M. Abbasi" <nma@12000.org> - 2015-06-20 22:47 -0500
      Re: How to construct matrix from vectors? "Nasser M. Abbasi" <nma@12000.org> - 2015-06-21 00:21 -0500
        Re: How to construct matrix from vectors? Fabien <fabien.maussion@gmail.com> - 2015-06-21 10:49 +0200
          Re: How to construct matrix from vectors? Dave Farrance <df@see.replyto.invalid> - 2015-06-21 12:49 +0100
      Re: How to construct matrix from vectors? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-21 09:32 +0100
      Re: How to construct matrix from vectors? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-06-21 11:12 -0400
        Re: How to construct matrix from vectors? lanuradha@gmail.com - 2015-06-21 09:00 -0700
  Re: How to construct matrix from vectors? Tony the Tiger <tony@tiger.invalid> - 2015-07-09 20:23 +0000

csiph-web