On 2022-03-07 06:00:57 -0800, Grant Edwards wrote:
> On 2022-03-07, Peter J. Holzer wrote:
> > On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
> >> On 2022-03-06, Avi Gross via Python-list wrote:
> >> > Python is named after a snake right?
> >>
> >> No. It's named after a comedy troupe.
> >
>
Op 4/03/2022 om 02:08 schreef Avi Gross via Python-list:
If Python was being designed TODAY, I wonder if a larger set of key words would
be marked as RESERVED for future expansion including ORELSE and even
NEVERTHELESS.
I think a better solution would be to have reserved words written lette
On Mon, 7 Mar 2022 18:07:42 +, "Schachner, Joseph"
declaimed the following:
>Can someone please change the topic of this thread? No longer about for-else.
>
Pretty much anyone can change the subject of the message when replying.
But if one is using a threaded client, that t
construct
On Sun, 6 Mar 2022 17:39:51 +0100, "Peter J. Holzer"
declaimed the following:
>
>(* *) for comments was actually pretty commonly used - maybe because it
>stands out more than { }. I don't know if I've ever seen (. .) instead
>of [ ].
>
Or
On 2022-03-07, Peter J. Holzer wrote:
> On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
>> On 2022-03-06, Avi Gross via Python-list wrote:
>> > Python is named after a snake right?
>>
>> No. It's named after a comedy troupe.
>
> He actually wrote that two sentences later.
Yes, I missed that.
On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
> On 2022-03-06, Avi Gross via Python-list wrote:
> > Python is named after a snake right?
>
> No. It's named after a comedy troupe.
He actually wrote that two sentences later.
hp
--
_ | Peter J. Holzer| Story must make more s
On 2022-03-06, Avi Gross via Python-list wrote:
> Python is named after a snake right?
No. It's named after a comedy troupe.
--
Grant
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 6 Mar 2022 17:39:51 +0100, "Peter J. Holzer"
declaimed the following:
>
>(* *) for comments was actually pretty commonly used - maybe because it
>stands out more than { }. I don't know if I've ever seen (. .) instead
>of [ ].
>
Or some terminals provided [ ] but not { }
On Mon, 7 Mar 2022 at 09:51, Avi Gross via Python-list
wrote:
>
> >>>
> Pascal versus PASCAL versus pascal (not versus paschal) and
> Perl versus PERL versus perl (not versus pearl)
>
> seems to be a topic.
> <<<
>
> The nitpickers here are irrelevant. I happen to know how things are formally
> s
orrect, it has a
proper spelling. But following that reasoning, why does anyone give an email
address of john.sm...@gmail.com or jane...@yahoo.com instead of ...?
-Original Message-
From: Peter J. Holzer
To: python-list@python.org
Sent: Sun, Mar 6, 2022 12:48 pm
Subject: Re: Behavior
On 2022-03-06 09:29:19 -0800, Grant Edwards wrote:
> On 2022-03-05, Avi Gross via Python-list wrote:
> > I am not sure how we end up conversing about PASCAL on a Python
> > forum.
> > [...]
> > I paid no attention to where PASCAL was being used other than I did
> > much of my grad school work in P
On 2022-03-05, Avi Gross via Python-list wrote:
> I am not sure how we end up conversing about PASCAL on a Python
> forum.
> [...]
> I paid no attention to where PASCAL was being used other than I did
> much of my grad school work in PASCAL [...]
It's "Pascal". It's not an acronym. It's a guy's
On 2022-03-05 14:25:35 -0500, Dennis Lee Bieber wrote:
> On Sat, 5 Mar 2022 12:39:36 -0600, "Michael F. Stemper"
> declaimed the following:
> >... especially Pascal, which was probably bigger in Germany and Austria
> >in the 1980s than was C.
>
> Pascal also defined alternate representation
and other languages
to undergrads ;-)
-Original Message-
From: Dennis Lee Bieber
To: python-list@python.org
Sent: Sat, Mar 5, 2022 7:00 pm
Subject: Re: Behavior of the for-else construct
On Sat, 5 Mar 2022 21:40:08 + (UTC), Avi Gross
declaimed the following:
>I am not sure how we end
On Sat, 5 Mar 2022 21:40:08 + (UTC), Avi Gross
declaimed the following:
>I am not sure how we end up conversing about PASCAL on a Python forum. But it
>is worth considering how people educated in aspects of Computer Science often
>come from somewhat different background and how it flavors w
On 05Mar2022 17:48, Avi Gross wrote:
>Since we still seem to be dreaming, I wonder when someone will suggest using
>some variation of the new match statement.
Ugh :-)
But...
What if break were implemented with an exception, like StopIteration but
for interruption instead of stop? And for-loop
To: python-list@python.org
Sent: Sat, Mar 5, 2022 1:39 pm
Subject: Re: Behavior of the for-else construct
On 04/03/2022 18.11, Peter J. Holzer wrote:
> On 2022-03-04 23:47:09 +, Avi Gross via Python-list wrote:
>> I am not sure a reply is needed, Peter, and what you say is true. But
On 04/03/2022 18.11, Peter J. Holzer wrote:
On 2022-03-04 23:47:09 +, Avi Gross via Python-list wrote:
I am not sure a reply is needed, Peter, and what you say is true. But
as you point out, when using a German keyboard, I would already have
a way to enter symbols like ä, ö, ü and ß and no
On Sat, 5 Mar 2022 12:39:36 -0600, "Michael F. Stemper"
declaimed the following:
>... especially Pascal, which was probably bigger in Germany and Austria
>in the 1980s than was C.
Pascal also defined alternate representations (per Jensen&Wirth) for
some of those (and I don't recall ever
my part of this endless conversation may have gone a bit beyond far
enough and I await some new topics.
-Original Message-
From: Rob Cliffe via Python-list
To: python-list@python.org
Sent: Sat, Mar 5, 2022 7:15 am
Subject: Re: Behavior of the for-else construct
On 05/03/2022 01:15, Camer
On 05/03/2022 01:15, Cameron Simpson wrote:
I sort of wish it had both "used break" and "did not use break"
branches, a bit like try/except/else.
And "zero iterations".
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 2022-03-05 00:25:44 +0100, Peter J. Holzer wrote:
> On 2022-03-04 11:34:07 +1100, Chris Angelico wrote:
> > What I'm hearing is that there are, broadly speaking, two types of
> > programmers [1]:
> >
> > 1) Those who think about "for-else" as a search tool and perfectly
> > understand how it be
On 03Mar2022 14:24, computermaster360 wrote:
>I want to make a little survey here.
>
>Do you find the for-else construct useful? Have you used it in
>practice? Do you even know how it works, or that there is such a thing
>in Python?
I used Python for years before understanding th
On 2022-03-04 23:47:09 +, Avi Gross via Python-list wrote:
> I am not sure a reply is needed, Peter, and what you say is true. But
> as you point out, when using a German keyboard, I would already have
> a way to enter symbols like ä, ö, ü and ß and no reason not to include
> them in variable
hon-list@python.org
Sent: Fri, Mar 4, 2022 5:57 pm
Subject: Re: Behavior of the for-else construct
On 2022-03-04 00:38:22 +, Avi Gross via Python-list wrote:
> I have seen major struggles to get other character sets into
> languages. Any new language typically should have this built in from
> s
On Sat, 5 Mar 2022 at 10:28, Peter J. Holzer wrote:
>
> On 2022-03-04 11:34:07 +1100, Chris Angelico wrote:
> > On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
> > wrote:
> > > The drumbeat I keep hearing is that some people hear/see the same
> > > word as implying something else. ELSE is
On 2022-03-04 11:34:07 +1100, Chris Angelico wrote:
> On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
> wrote:
> > The drumbeat I keep hearing is that some people hear/see the same
> > word as implying something else. ELSE is ambiguous in the context it
> > is used.
>
> What I'm hearing is
To: python-list@python.org
Sent: Fri, Mar 4, 2022 5:22 pm
Subject: Re: Behavior of the for-else construct
On 04/03/2022 20:52, Avi Gross via Python-list wrote:
>
> I have an observation about exception handling in general. Some people use
> exceptions, including ones they create and t
On 2022-03-04 14:04:48 -0600, Om Joshi wrote:
> I'm not sure if anyone has mentioned it on this thread, but with
> respect to your comment about adding either on.empty or a decorator,
> the Django template syntax uses
>
> {% for x in iterator %}
> {{ x }}
> {% empty %}
> Empty
> {% endfor %}
>
On 2022-03-04 08:38:52 -0600, Tim Chase wrote:
> On 2022-03-04 11:55, Chris Angelico wrote:
> > In MS-DOS, it was perfectly possible to have spaces in file names
>
> DOS didn't allow space (0x20) in filenames unless you hacked it by
> hex-editing your filesystem (which I may have done a couple tim
On 2022-03-04 00:38:22 +, Avi Gross via Python-list wrote:
> I have seen major struggles to get other character sets into
> languages. Any new language typically should have this built in from
> scratch and should consider adding non-ASCII characters into the mix.
> Mathematicians often use lot
On 04/03/2022 20:52, Avi Gross via Python-list wrote:
I have an observation about exception handling in general. Some people use
exceptions, including ones they create and throw, for a similar idea. You might
for example try to use an exception if your first attempt fails that specifies
try
lows
something like:
result = for ...
That might return 0 or None if it was part of the language but it is not.
Avi (my current first name)
-Original Message-
From: Om Joshi
To: Avi Gross
Cc: python-list
Sent: Fri, Mar 4, 2022 3:04 pm
Subject: Re: Behavior of the for-else constru
On 03/03/2022 19.54, Rob Cliffe wrote:
On 04/03/2022 01:44, Ethan Furman wrote:
On 3/3/22 5:32 PM, Rob Cliffe via Python-list wrote:
> There are three types of programmer: those that can count, and those that
can't.
Actually, there are 10 types of programmer: those that can count in binary,
On Sat, 5 Mar 2022 at 07:52, Avi Gross wrote:
>
> Chris,
>
> My example was precisely what to do when it is an empty closet:
Does it correctly handle a closet with shirts in it, though?
There's not a lot of point demonstrating an alternate use for the
"else" clause when it is *absolutely identic
nal Message-
From: Chris Angelico
To: python-list@python.org
Sent: Fri, Mar 4, 2022 12:47 pm
Subject: Re: Behavior of the for-else construct
On Sat, 5 Mar 2022 at 03:44, Avi Gross via Python-list
wrote:
>
> Dieter,
>
> Your use is creative albeit it is not "needed" since
On 2022-03-04 at 11:14:29 -0500,
Dennis Lee Bieber wrote:
> Try to tell the difference between
>
> afileand
> afile
>
> when doing a directory listing.
Easy: log in over a 110 baud modem, where the characters take almost as
much time as the beep. ;-)
--
https://mail.python
English or are more fluent in other languages. T may may be used to other
> word orders for example. They may move verbs to the end of a sentence or
> place adjectives or other modifiers after versus before a word and forget
> about all the other games played where the same word
er versus before a word and forget about all
the other games played where the same word means something completely
different. To them ELSE may either mean nothing or the phrase IF ... ELSE may
be said differently or adding a clause after the construct is not seen as
natural.
So was this way of doing FO
On Fri, 4 Mar 2022 08:38:52 -0600, Tim Chase
declaimed the following:
>DOS didn't allow space (0x20) in filenames unless you hacked it by
>hex-editing your filesystem (which I may have done a couple times).
>However it did allow you to use 0xFF in filenames which *appeared* as
>a space in most ch
On Sat, 5 Mar 2022 at 03:44, Avi Gross via Python-list
wrote:
>
> Dieter,
>
> Your use is creative albeit it is not "needed" since all it does is make sure
> your variable is initialized to something, specifically None.
>
> So would this not do the same thing?
>
> eye = None
>
> for eye in ra
On Sat, 5 Mar 2022 at 02:02, Tim Chase wrote:
>
> On 2022-03-04 11:55, Chris Angelico wrote:
> > In MS-DOS, it was perfectly possible to have spaces in file names
>
> DOS didn't allow space (0x20) in filenames unless you hacked it by
> hex-editing your filesystem (which I may have done a couple t
Avi Gross wrote at 2022-3-4 16:43 +:
>Your use is creative albeit it is not "needed" since all it does is make sure
>your variable is initialized to something, specifically None.
>
>So would this not do the same thing?
>
> eye = None
>
> for eye in range(0):
> print(eye)
>
> eye
It wo
as discussed, you could do an IF statement to check if closet is empty but
for iterators, it gets ...
-Original Message-
From: Dieter Maurer
To: Rob Cliffe
Cc: python-list@python.org
Sent: Fri, Mar 4, 2022 2:12 am
Subject: Re: Behavior of the for-else construct
Rob Cliffe wrote at 2022-3
On 2022-03-04 11:55, Chris Angelico wrote:
> In MS-DOS, it was perfectly possible to have spaces in file names
DOS didn't allow space (0x20) in filenames unless you hacked it by
hex-editing your filesystem (which I may have done a couple times).
However it did allow you to use 0xFF in filenames wh
On Fri, 4 Mar 2022 at 21:02, gene heskett wrote:
> That makes the logic work, but who then cleans up the trash on the stack.
> Thats a memory leak.
>
Not sure I follow?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
>
> > > else: # if no item in search_list matched the criteria
> > >
> > >You get the idea.
> > >If I really want to remember what this construct means, I remind
> > >myself that `else` here really means `no break`. Would have been
> >
em")
There's a parallel here. Since a for-else loop is basically useless
without an if-break construct inside it, the else clause can be
thought of as the else on a massive if/elif chain:
if stuff[0].is_good:
print("This item is good", stuff[0])
elif stuff[1].is_good:
Op 4/03/2022 om 8:18 schreef Chris Angelico:
On Fri, 4 Mar 2022 at 18:13, Dieter Maurer wrote:
> One of my use cases for `for - else` does not involve a `break`:
> the initialization of the loop variable when the sequence is empty.
> It is demonstrated by the following transscript:
>
> ```pycon
myself (and anyone else unfortunate enough to read my
> >code) what triggers it, e.g.
> >
> > for item in search_list:
> > ...
> > ... break
> > else: # if no item in search_list matched the criteria
> >
> >You get the idea.
&g
gers it, e.g.
>
> for item in search_list:
> ...
> ... break
> else: # if no item in search_list matched the criteria
>
>You get the idea.
>If I really want to remember what this construct means, I remind myself
>that `else` here really means `no break`.
On Fri, 4 Mar 2022 at 14:37, Avi Gross via Python-list
wrote:
>
> That is one way to look at it, Jach. Of course, a particular loop may have
> multiple break statements each meaning something else. The current
> implementation makes all of them jump to the same ELSE statement so in one
> sense,
an ELSE dangling.
-Original Message-
From: Jach Feng
To: python-list@python.org
Sent: Thu, Mar 3, 2022 9:22 pm
Subject: Re: Behavior of the for-else construct
I never feel confused by "else" because I always think it in "break...else",
not "for...else".
ge as a single character,
> albeit implemented using multiple bytes? If my editor let me insert the darn
> thing, it might then be a reasonable use for some construct in the language
> unique and new. Maybe the language would use the notation to hold objects
> holding a set and no
the other
way. Could we add the symbol to the language as a single character, albeit
implemented using multiple bytes? If my editor let me insert the darn thing, it
might then be a reasonable use for some construct in the language unique and
new. Maybe the language would use the notation
I never feel confused by "else" because I always think it in "break...else",
not "for...else". For those who always think in "for...else" deserves this
confusion and it can't be just escaped by replacing with another magic word
such as "then" or "finally" etc:-)
--Jach
--
https://mail.python.
On 04/03/2022 00:55, Chris Angelico wrote:
for victim in debtors:
if victim.pay(up): continue
if victim.late(): break
or else:
victim.sleep_with(fishes)
If you mean "or else" to be synonymous with "else", then only the last
debtor is killed, whether he has paid up or not, whic
On 04/03/2022 01:44, Ethan Furman wrote:
On 3/3/22 5:32 PM, Rob Cliffe via Python-list wrote:
> There are three types of programmer: those that can count, and those
that can't.
Actually, there are 10 types of programmer: those that can count in
binary, and those that can't.
1, 10, many.
On 4/03/22 1:55 pm, Chris Angelico wrote:
It's much better to treat arguments as a vector of strings
rather than a single string, as the start command tries to.
It would be nice if you could, but as I understand it, Windows always
passes arguments to a program as a single string, and then it's
On 3/3/22 5:32 PM, Rob Cliffe via Python-list wrote:
> There are three types of programmer: those that can count, and those that
can't.
Actually, there are 10 types of programmer: those that can count in binary,
and those that can't.
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/pyt
else unfortunate enough to read my
code) what triggers it, e.g.
for item in search_list:
...
... break
else: # if no item in search_list matched the criteria
A "break" statement always takes you to the line following the current
loop construct. The "else
On 04/03/2022 00:38, Avi Gross via Python-list wrote:
Rob,
I regularly code with lots of comments like the one you describe, or mark the
end of a region that started on an earlier screen such as a deeply nested
construct.
So do I (and not just in Python). It's good practice.
I hav
On 04/03/2022 00:34, Chris Angelico wrote:
On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
wrote:
The drumbeat I keep hearing is that some people hear/see the same word as
implying something else. ELSE is ambiguous in the context it is used.
What I'm hearing is that there are, broad
n
NEVERTHELESS.
-Original Message-
From: Chris Angelico
To: python-list@python.org
Sent: Thu, Mar 3, 2022 7:34 pm
Subject: Re: Behavior of the for-else construct
On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
wrote:
>
> The drumbeat I keep hearing is that some people h
On Fri, 4 Mar 2022 at 11:39, Avi Gross via Python-list
wrote:
>
> Rob,
>
> I regularly code with lots of comments like the one you describe, or mark the
> end of a region that started on an earlier screen such as a deeply nested
> construct.
>
> I have had problems t
ad my
> code) what triggers it, e.g.
>
> for item in search_list:
> ...
> ... break
> else: # if no item in search_list matched the criteria
A "break" statement always takes you to the line following the current
loop construct. The "else
Rob,
I regularly code with lots of comments like the one you describe, or mark the
end of a region that started on an earlier screen such as a deeply nested
construct.
I have had problems though when I have shared such code and the recipient
strips my comments and then later wants me to make
On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
wrote:
>
> The drumbeat I keep hearing is that some people hear/see the same word as
> implying something else. ELSE is ambiguous in the context it is used.
>
What I'm hearing is that there are, broadly speaking, two types of
programmers [1]
:
...
... break
else: # if no item in search_list matched the criteria
You get the idea.
If I really want to remember what this construct means, I remind myself
that `else` here really means `no break`. Would have been better if it
had been spelt `nobreak` or similar in the first place.
Rob
age must be added to sparingly and with so many requests, perhaps
only a few non bug-fixes can seriously be considered.
-Original Message-
From: Akkana Peck
To: python-list@python.org
Sent: Thu, Mar 3, 2022 5:33 pm
Subject: Re: Behavior of the for-else construct
computermaster360 writes
computermaster360 writes:
> I want to make a little survey here.
>
> Do you find the for-else construct useful?
No.
> Have you used it in practice?
Once or twice, but ended up removing it, see below.
> Do you even know how it works, or that there is such a thing in Python?
I
On 2022-03-03, computermaster360 wrote:
> Do you find the for-else construct useful? Have you used it in
> practice?
Yes, I use it frequently.
> I have used it maybe once. My issue with this construct is that
> calling the second block `else` doesn't make sense; a much mor
On 03/03/2022 07.24, computermaster360 wrote:
I want to make a little survey here.
Do you find the for-else construct useful? Have you used it in
practice? Do you even know how it works, or that there is such a thing
in Python?
I only found out about it within the last year or so. I've
On Thu, 3 Mar 2022 at 18:25, Schachner, Joseph
wrote:
> I don't know what that would be. "finally" is available 😊 Write up a
> feature request.
Not sure if you mean `finally` seriously but I think that would about
as confusing as the current `else`, if not even more 😅
Meanwhile, I found anoth
re request.
--- Joseph S.
Teledyne Confidential; Commercially Sensitive Business Data
-Original Message-
From: computermaster360
Sent: Thursday, March 3, 2022 8:24 AM
To: python-list@python.org
Subject: Behavior of the for-else construct
I want to make a little survey here.
Do you fi
computermaster360 wrote at 2022-3-3 14:24 +0100:
>Do you find the for-else construct useful?
Yes.
>Have you used it in practice?
Yes
--
https://mail.python.org/mailman/listinfo/python-list
if the loop was executed zero times
but these have not been accepted.
Best wishes
Rob Cliffe
On 03/03/2022 13:24, computermaster360 wrote:
I want to make a little survey here.
Do you find the for-else construct useful? Have you used it in
practice? Do you even know how it works, or that there
Op 3/03/2022 om 14:24 schreef computermaster360:
I want to make a little survey here.
Do you find the for-else construct useful? Have you used it in
practice? Do you even know how it works, or that there is such a thing
in Python?
- No, or at least not when balanced against the drawbacks as I
On 2022-03-03, computermaster360 wrote:
> Do you find the for-else construct useful?
Yes.
> Have you used it in practice?
Yes.
I don't use it often, but I do use it occasionally.
However, I always have to look it up the docs to confirm the logic. I
always feel like the els
On 2022-03-04 02:02, Chris Angelico wrote:
>> I want to make a little survey here.
>>
>> Do you find the for-else construct useful? Have you used it in
>> practice? Do you even know how it works, or that there is such a
>> thing in Python?
>
> Yes, yes, and y
> On 3 Mar 2022, at 13:24, computermaster360
> wrote:
>
> I want to make a little survey here.
>
> Do you find the for-else construct useful?
No. I always have to look up what condition the else fires on.
> Have you used it in
> practice?
No.
> Do you even
On Fri, 4 Mar 2022 at 00:25, computermaster360
wrote:
>
> I want to make a little survey here.
>
> Do you find the for-else construct useful? Have you used it in
> practice? Do you even know how it works, or that there is such a thing
> in Python?
Yes, yes, and yes-yes. It&
On Thu, Mar 3, 2022 at 5:24 AM computermaster360 <
computermaster...@gmail.com> wrote:
> I want to make a little survey here.
>
> Do you find the for-else construct useful? Have you used it in
> practice? Do you even know how it works, or that there is such a thing
> in Pytho
I want to make a little survey here.
Do you find the for-else construct useful? Have you used it in
practice? Do you even know how it works, or that there is such a thing
in Python?
I have used it maybe once. My issue with this construct is that
calling the second block `else` doesn't make
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 wou
Fabien wrote:
>another solution with less "(([[]]))", and less ";". There are way too
>many ";" in Matlab ;)
>
>import numpy as np
>v1 = [1, 2, 3]
>v2 = [4, 5, 6]
>v3 = [7, 8, 9]
>v4 = [10, 11, 12]
>np.hstack([[v1, v2], [v3, v4]]).T
>Out[]:
>array([[ 1, 4],
>[ 2, 5],
>[ 3, 6],
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],
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 6/20/2015 10:47 PM, Nasser M. Abbasi wrote:
I did manage to find a way:
-
r1 =np.hstack([(v1,v2)]).T
r2 =np.hstack([(v3,v4)]).T
mat = np.vstack((r1,r2))
-
Out[211]:
array([[ 1, 4],
[ 2, 5],
[ 3, 6],
[
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]])
, each is 3 rows.
I want to use these to construct matrix mat, which is
[[v1,v2],
[v3,v4]]
So the resulting matrix is as shown in the link. i.e.
it will be 6 rows and 2 columns.
This is what I tried:
import numpy as np
v1=np.array([1,2,3]);
v2=np.array([4,5,6]);
v3=np.array
construct matrix mat, which is
[[v1,v2],
[v3,v4]]
So the resulting matrix is as shown in the link. i.e.
it will be 6 rows and 2 columns.
This is what I tried:
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
Op 04-11-13 10:07, Ben Finney schreef:
> Antoon Pardon writes:
>
>> This is a typical: "Heads, I win, Tail, you lose" situation that is
>> being set up.
>
> If you see a discussion as a zero-sum game – like a coin toss, where one
> person's win can only be at the expense of someone else's loss –
Antoon Pardon writes:
> This is a typical: "Heads, I win, Tail, you lose" situation that is
> being set up.
If you see a discussion as a zero-sum game – like a coin toss, where one
person's win can only be at the expense of someone else's loss – then I
fear this isn't going to be productive.
Su
Op 03-11-13 23:11, Ben Finney schreef:
> Antoon Pardon writes:
>
>> Op 03-11-13 06:17, Steven D'Aprano schreef:
>>> I'm trying hard to give up threads like this, where people debate
>>> the subjective tone of an email and ever more pedantic arguments
>>> about the precise wording. Even when all p
Antoon Pardon writes:
> Op 03-11-13 06:17, Steven D'Aprano schreef:
> > I'm trying hard to give up threads like this, where people debate
> > the subjective tone of an email and ever more pedantic arguments
> > about the precise wording. Even when all participants are arguing in
> > good faith, t
Op 03-11-13 06:17, Steven D'Aprano schreef:
> On Sat, 02 Nov 2013 18:22:38 +, Joshua Landau wrote:
> [...]
>> Sure, you in all probability didn't mean it like that but rurpy isn't
>> uncalled for in raising the concern. Really I just want to remind you
>> that you're both on the same side here.
On 11/02/2013 11:17 PM, Steven D'Aprano wrote:
> On Sat, 02 Nov 2013 18:22:38 +, Joshua Landau wrote:
> [...]
>> Sure, you in all probability didn't mean it like that but rurpy isn't
>> uncalled for in raising the concern. Really I just want to remind you
>> that you're both on the same side he
test at the end of the loop. So yet
> again your claims are simply wrong.
That was an unfortunate example for you to chose since it
directly contradicts your claims.
Read that quote again. You are a programmer. You should
understand logic. Please explain how acknowledging *one*
useful
Op 03-11-13 06:17, Steven D'Aprano schreef:
> On Sat, 02 Nov 2013 18:22:38 +, Joshua Landau wrote:
> [...]
>> Sure, you in all probability didn't mean it like that but rurpy isn't
>> uncalled for in raising the concern. Really I just want to remind you
>> that you're both on the same side here.
1 - 100 of 479 matches
Mail list logo