On Sunday, 21 June 2015 20:43:15 UTC+5:30, Dennis Lee Bieber wrote:
On Sun, 21 Jun 2015 09:32:55 +0100, Mark Lawrence declaimed the following:
On 21/06/2015 04:47, Nasser M. Abbasi wrote:
But it is not as intuitive as with Matlab
For those of us who don't know would you be kind
],
[ 3, 6],
[ 7, 10],
[ 8, 11],
[ 9, 12]])
Neat. And if the OP wants vectors in np array form to start with, and
to stack them together without transposing at that point, he could do it
like this:
v1=np.vstack([1,2,3])
v2=np.vstack([4,5,6])
v3=np.vstack([7,8,9])
v4
On 21/06/2015 04:47, Nasser M. Abbasi wrote:
But it is not as intuitive as with Matlab
For those of us who don't know would you be kind enough to do a cost
comparison of Matlab vs Python licenses?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for
On 06/21/2015 07:21 AM, Nasser M. Abbasi wrote:
v1=np.array([(1,2,3)]).T
v2=np.array([(4,5,6)]).T
v3=np.array([(7,8,9)]).T
v4=np.array([(10,11,12)]).T
mat =np.hstack(( np.vstack((v1,v3)), np.vstack((v2,v4))) )
Out[236]:
array([[ 1, 4],
[ 2, 5],
[ 3, 6],
[ 7, 10],
I just started to learn some python today for first time,
so be easy on me.
I am having some trouble figuring how do the problem shown in this link
http://12000.org/my_notes/mma_matlab_control/KERNEL/KEse44.htm
Given 4 column vectors, v1,v2,v3,v4, each is 3 rows.
I want to use
On 6/20/2015 9:20 PM, MRAB wrote:
Here's one way, one step at a time:
r1 = np.concatenate([v1, v2])
r1
array([1, 2, 3, 4, 5, 6])
r2 = np.concatenate([v3, v4])
r2
array([ 7, 8, 9, 10, 11, 12])
m = np.array([r1, r2])
m
array([[ 1, 2, 3, 4, 5, 6],
[ 7, 8, 9, 10, 11, 12]])
On 2015-06-21 02:57, Nasser M. Abbasi wrote:
I just started to learn some python today for first time,
so be easy on me.
I am having some trouble figuring how do the problem shown in this link
http://12000.org/my_notes/mma_matlab_control/KERNEL/KEse44.htm
Given 4 column vectors, v1,v2,v3,v4
to Matlab's method: First
make all the vectors column vectors
v1=np.array([(1,2,3)]).T
v2=np.array([(4,5,6)]).T
v3=np.array([(7,8,9)]).T
v4=np.array([(10,11,12)]).T
mat =np.hstack(( np.vstack((v1,v3)), np.vstack((v2,v4))) )
Out[236]:
array([[ 1, 4],
[ 2, 5],
[ 3, 6],
[ 7, 10
On May 24, 12:27 am, Deeyana d.awlb...@hotmail.invalid wrote:
Classic unsubstantiated and erroneous claim. Scheme does not come OOTB
with any suitable libraries for host interop and though it can make calls
to C libraries, doing so is awkward and involves difficulties with the
impedance
On Tue, May 24, 2011 at 8:27 AM, Deeyana d.awlberg@hotmail.invalid wrote:
Classic unsubstantiated and erroneous claim. Scheme does not come OOTB
with any suitable libraries for host interop and though it can make calls
to C libraries, doing so is awkward and involves difficulties with the
On Tue, 24 May 2011 13:39:15 -0700, asandroq wrote:
On May 24, 12:27 am, Deeyana d.awlb...@hotmail.invalid wrote:
Classic unsubstantiated and erroneous claim. Scheme does not come OOTB
with any suitable libraries for host interop and though it can make
calls to C libraries, doing so is
On May 23, 4:29 am, Deeyana d.awlb...@hotmail.invalid wrote:
You might be interested in Clojure, then. Lists are more abstracted, like
in Scheme, and vectors and also dictionaries/maps and sets are first
class citizens along side lists. And unlike Scheme, Clojure has good
library/host interop
torb...@diku.dk (Torben Ægidius Mogensen) writes:
Xah Lee xah...@gmail.com writes:
Functional Programing: stop using recursion, cons. Use map vectors.
〈Guy Steele on Parallel Programing〉
http://xahlee.org/comp/Guy_Steele_parallel_computing.html
This is more or less what Backus said
On 23.5.2011 16:39, Pascal J. Bourguignon wrote:
torb...@diku.dk (Torben Ægidius Mogensen) writes:
Xah Leexah...@gmail.com writes:
Functional Programing: stop using recursion, cons. Use map vectors.
〈Guy Steele on Parallel Programing〉
http://xahlee.org/comp
On Mon, 23 May 2011 00:52:07 -0700, asandroq wrote:
On May 23, 4:29 am, Deeyana d.awlb...@hotmail.invalid wrote:
You might be interested in Clojure, then. Lists are more abstracted,
like in Scheme, and vectors and also dictionaries/maps and sets are
first class citizens along side lists
this is important but i think most lispers and functional programers
still don't know it.
Functional Programing: stop using recursion, cons. Use map vectors.
〈Guy Steele on Parallel Programing〉
http://xahlee.org/comp/Guy_Steele_parallel_computing.html
btw, lists (as cons, car, cdr
On Sun, 22 May 2011 15:47:53 -0700, Xah Lee wrote:
this is important but i think most lispers and functional programers
still don't know it.
Functional Programing: stop using recursion, cons. Use map vectors.
〈Guy Steele on Parallel Programing〉
http://xahlee.org/comp
On Monday 25 April 2011 20:49:34 Jonathan Hartley wrote:
On Apr 20, 2:43 pm, Andreas Tawn andreas.t...@ubisoft.com
wrote:
Algis Kabaila akaba...@pcug.org.au writes:
Are there any modules for vector algebra (three
dimensional vectors, vector addition, subtraction,
multiplication
modules for vector algebra (three
dimensional vectors, vector addition, subtraction,
multiplication [scalar and vector]. Could you give me
a reference to such module?
NumPy
Or one of these libraries (ctypes or Cython):
BLAS (Intel MKL, ACML, ACML-GPU, GotoBLAS2, or ATLAS
On Apr 20, 2:43 pm, Andreas Tawn andreas.t...@ubisoft.com wrote:
Algis Kabaila akaba...@pcug.org.au writes:
Are there any modules for vector algebra (three dimensional
vectors, vector addition, subtraction, multiplication [scalar
and vector]. Could you give me a reference
On 4/22/11 7:32 PM, Algis Kabaila wrote:
On Saturday 23 April 2011 06:57:23 sturlamolden wrote:
On Apr 20, 9:47 am, Algis Kabailaakaba...@pcug.org.au
wrote:
Are there any modules for vector algebra (three dimensional
vectors, vector addition, subtraction, multiplication
[scalar and vector
vectors, vector addition, subtraction, multiplication
[scalar and vector]. Could you give me a reference to such
module?
NumPy
Or one of these libraries (ctypes or Cython):
BLAS (Intel MKL, ACML, ACML-GPU, GotoBLAS2, or ATLAS)
Intel VML
ACML-VM
Thanks for that. Last time I looked
On Saturday 23 April 2011 14:13:31 sturlamolden wrote:
On Apr 23, 2:32 am, Algis Kabaila akaba...@pcug.org.au
wrote:
Thanks for that. Last time I looked at numpy (for Python3)
it was available in source only. I know, real men do
compile, but I am an old man... I will compile if it is
On Apr 23, 2:26 pm, Algis Kabaila akaba...@pcug.org.au wrote:
I do understand that many people prefer Win32 and
appreciate their right to use what they want. I just am at a
loss to understand *why* ...
For the same reason some people prefered OS/2 or
DEC to SunOS or BSD.
For the same reason
On Friday 22 April 2011 11:43:26 Gregory Ewing wrote:
Algis Kabaila wrote:
the Vector3 class
is available without any prefix euclid:
import euclid
v = Vector3(111.., 222.2, 333.3)
Doesn't work that way for me:
Python 2.7 (r27:82500, Oct 15 2010, 21:14:33)
[GCC 4.2.1 (Apple Inc.
On Apr 20, 9:47 am, Algis Kabaila akaba...@pcug.org.au wrote:
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
Or one of these libraries (ctypes or Cython
On Saturday 23 April 2011 06:57:23 sturlamolden wrote:
On Apr 20, 9:47 am, Algis Kabaila akaba...@pcug.org.au
wrote:
Are there any modules for vector algebra (three dimensional
vectors, vector addition, subtraction, multiplication
[scalar and vector]. Could you give me a reference
On Apr 23, 2:32 am, Algis Kabaila akaba...@pcug.org.au wrote:
Thanks for that. Last time I looked at numpy (for Python3) it
was available in source only. I know, real men do compile, but
I am an old man... I will compile if it is unavoidable, but in
case of numpy it does not seem a simple
On Thursday 21 April 2011 01:49:57 Andreas Tawn wrote:
On Apr 20, 6:43 am, Andreas Tawn andreas.t...@ubisoft.com
wrote:
Algis Kabaila akaba...@pcug.org.au writes:
Are there any modules for vector algebra (three
dimensional vectors, vector addition, subtraction,
multiplication
Andreas Tawn andreas.t...@ubisoft.com writes:
You might also want to consider http://code.google.com/p/pyeuclid/
Thanks, I was studying quaternions recently and had to use two
packages to get some stuff done. And of course one of them used
ass-backwards declaration for a quaternion and one
Algis Kabaila wrote:
the Vector3 class
is available without any prefix euclid:
import euclid
v = Vector3(111.., 222.2, 333.3)
Doesn't work that way for me:
Python 2.7 (r27:82500, Oct 15 2010, 21:14:33)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type help, copyright, credits or license
Hi,
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?
platform - ubuntu 10.10 (Linux), Python 3.1 or higher.
Thanks for your help to avoid re-invention
On Wed, Apr 20, 2011 at 12:47 AM, Algis Kabaila akaba...@pcug.org.au wrote:
Hi,
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?
Dunno if it has 3D-specific
Algis Kabaila akaba...@pcug.org.au 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
Algis Kabaila akaba...@pcug.org.au 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
On Apr 20, 6:43 am, Andreas Tawn andreas.t...@ubisoft.com wrote:
Algis Kabaila akaba...@pcug.org.au writes:
Are there any modules for vector algebra (three dimensional
vectors, vector addition, subtraction, multiplication [scalar
and vector]. Could you give me a reference
On Apr 20, 6:43 am, Andreas Tawn andreas.t...@ubisoft.com wrote:
Algis Kabaila akaba...@pcug.org.au writes:
Are there any modules for vector algebra (three dimensional
vectors, vector addition, subtraction, multiplication [scalar
and vector]. Could you give me a reference
I have two variables that are stored in a data set and also are stored
as matrices and vectors. I want to formulate only one constraint that
is a function of all the data set's observations (or elements of these
vectors) and a decision variable. Suppose the two stored variables
(two vectors
Iain Wade iw...@optusnet.com.au added the comment:
d'oh, I should have checked HEAD before submitting the bug.
I am running 2.5.1 on OSX, the fix seems to be in 2.5.2 and above.
Thanks, and sorry for wasting your time.
--
status: open - closed
___
Hagen Fürstenau hfuerste...@gmx.net added the comment:
Seems like this has already been fixed as issue 1385.
--
nosy: +hagen
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6473
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Indeed, the provided test file passes on all python versions I have.
Iain, does this script fail on some version?
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
Changes by Antoine Pitrou pit...@free.fr:
--
priority: - critical
stage: - needs patch
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6473
New submission from Iain Wade iw...@optusnet.com.au:
Test vectors are in the following draft rfc:
http://tools.ietf.org/html/draft-nystrom-smime-hmac-sha
The problem is that hmac.py has a hard-coded block size of 64, while
SHA-384 and SHA-512 have a 128-byte block size.
Suggested fix
Hi,
Short question: why (1,abc,0.3)+(2,def,10.2) != (3,abcdef,10.5)?
How to elegantly achieve (3,abcdef,10.5) as a result of addition ...
Andy
--
http://mail.python.org/mailman/listinfo/python-list
Andy Leszczynski [EMAIL PROTECTED] writes:
Short question: why (1,abc,0.3)+(2,def,10.2) != (3,abcdef,10.5)?
How to elegantly achieve (3,abcdef,10.5) as a result of addition ...
tuple([(a+b) for a,b in zip((1,abc,0.3),(2,def,10.2))])
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin http://[EMAIL PROTECTED] writes:
Andy Leszczynski [EMAIL PROTECTED] writes:
Short question: why (1,abc,0.3)+(2,def,10.2) != (3,abcdef,10.5)?
How to elegantly achieve (3,abcdef,10.5) as a result of addition ...
tuple([(a+b) for a,b in zip((1,abc,0.3),(2,def,10.2))])
Andy Leszczynski [EMAIL PROTECTED] wrote:
Hi,
Short question: why (1,abc,0.3)+(2,def,10.2) != (3,abcdef,10.5)?
Because '+' applied to sequences means to concatenate them -- a more
frequent need than element by element addition (which I notice you
would NOT want to apply to strings, only to
Mike Meyer [EMAIL PROTECTED] writes:
map(operator.add, (1, abc, 0.3), (2, def, 10.2))
[3, 'abcdef', 10.5]
Not having to do the zip is win. operator.add is a lose. I'm not sure
either is what I'd call elegant.
Yeah, I didn't bother checking whether you could pass dyadic functions
to map.
On Mon, 19 Dec 2005 22:06:31 -0500
Andy Leszczynski [EMAIL PROTECTED] wrote:
Short question: why (1,abc,0.3)+(2,def,10.2) !=
(3,abcdef,10.5)?
How to elegantly achieve (3,abcdef,10.5) as a result of
addition ...
(a,b,c) is a tuple, not a vector.
IMHO, the elegant thing to do is to define a
I'm new to C++, coming from a Python background. I wrote the following
code in C++ based on the Python code found here:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302478
//beginning
#include vector
#include iostream.h
using namespace std;
void looper(vector vectorint nseq,
I didn't look at the original code but i you should know that passing
vectors directly (i.e by value) to functions is not a good idea
(results in big copy), its better to use `const vector ` or
`vector ` (i.e. by reference). In general you should try to reduce
the number of vector coping
lugal wrote:
Your code has an undeclared int i in main().
gseq.erase(0);
I think erase() takes a pointer, not the element index:
gseq.erase(qseq.begin());
in the recursive function. Is my C++ translation accurate from the
original Python?
Coming from a Python background, you should have
Thanks for all your help everyone, if only it had addressed what I had
asked I may have actually learned something about Python!!
If anything was addressed to my problem then it has completely passed
me by as most points were clearly made by a computer scientist and I am
not one of those in the
Arthur [EMAIL PROTECTED] wrote:
thinking that the visciousness with wihich you were attacking someone
suggesting a proposal for an optional feature - even if an iill
adivised proposal for and ill advised optional feature (I frankly
don't care much about that part of the discussion one way or
SOrry if this message is a little confused, it most probably reflects
the state of the author!
I have made a small program that plots the orbit of a planet in visual
python using visual.vector for all values. If i run the program it is
clear that the orbit is non-keplerian as the planets
Arthur [EMAIL PROTECTED] wrote:
is that VPython vectors are in effect flat 3 element Numeric arrays,
and Numeric ararys can be constructed with Float64 specified as the
datatype. (wonder if that speciufication is a declaration, and if
so whether that would indicate some conflict between
Terry Reedy [EMAIL PROTECTED] wrote:
I (and I believe Alex) object to name declaration *statements* and/or the
strong typing of *names*.
I confirm that my key objection is to declarations in the strict sense:
thingies that aren't executable, but rather billets doux to the
compiler, for example
On Thu, 10 Feb 2005 00:16:05 +0100, [EMAIL PROTECTED] (Alex Martelli)
wrote:
Arthur [EMAIL PROTECTED] wrote:
Please clarify if you were making a lame joke without smilies, are
utterly confused about what declaration *MEANS*, or what other folly
prompted you to this astounding remark, thanks.
On Thu, 10 Feb 2005 00:16:05 +0100, [EMAIL PROTECTED] (Alex Martelli)
wrote:
Having found out how to
build a lasting killfile, I'd like to see if using it liberally on
people who appear to post here just to provoke flamewars, rather than to
offer and receive help, and participate in interesting
59 matches
Mail list logo