it for them, as in some asking about HW.
I am not joining this one. 😉
-Original Message-
From: Python-list On
Behalf Of Karsten Hilbert
Sent: Sunday, October 31, 2021 4:00 PM
To: python-list@python.org
Subject: Re: How to apply a self defined function in Pandas
Am Sun, Oct 31, 2021 at
On Sun, 31 Oct 2021 at 18:42, Shaozhong SHI wrote:
>
>
> On Sunday, 31 October 2021, Albert-Jan Roskam
> wrote:
>
>>
>>
>> > df['URL'] = df.apply(lambda x: connect(df['URL']), axis=1)
>>
>>
>> I think you need axis=0. Or use the Series, df['URL'] =
>> df.URL.apply(connect)
>>
>
> Just experime
Am Sun, Oct 31, 2021 at 07:52:18PM + schrieb Shaozhong SHI:
> Well, can you expand the the simplicity?
Not sure how expanding is going to help but here's one way to
do it:
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyr
On Sun, 31 Oct 2021 at 19:28, MRAB wrote:
> On 2021-10-31 18:48, Shaozhong SHI wrote:
> >
> > On Sunday, 31 October 2021, MRAB wrote:
> >
> > On 2021-10-31 17:25, Shaozhong SHI wrote:
> >
> > I defined a function and apply it to a column
On 2021-10-31 18:48, Shaozhong SHI wrote:
On Sunday, 31 October 2021, MRAB wrote:
On 2021-10-31 17:25, Shaozhong SHI wrote:
I defined a function and apply it to a column in Pandas. But
it does not
return correct values.
I am trying to test which url in a
On Sunday, 31 October 2021, MRAB wrote:
> On 2021-10-31 17:25, Shaozhong SHI wrote:
>
>> I defined a function and apply it to a column in Pandas. But it does not
>> return correct values.
>>
>> I am trying to test which url in a column full of url to see which one
On Sunday, 31 October 2021, Albert-Jan Roskam
wrote:
>
>
> > df['URL'] = df.apply(lambda x: connect(df['URL']), axis=1)
>
>
> I think you need axis=0. Or use the Series, df['URL'] =
> df.URL.apply(connect)
>
Any details?
I will try and let you know. Regards, David
--
https://mail.python.org/ma
> df['URL'] = df.apply(lambda x: connect(df['URL']), axis=1)
I think you need axis=0. Or use the Series, df['URL'] =
df.URL.apply(connect)
--
https://mail.python.org/mailman/listinfo/python-list
On 2021-10-31 17:25, Shaozhong SHI wrote:
I defined a function and apply it to a column in Pandas. But it does not
return correct values.
I am trying to test which url in a column full of url to see which one can
be connected to or not
def connect(url):
try
I defined a function and apply it to a column in Pandas. But it does not
return correct values.
I am trying to test which url in a column full of url to see which one can
be connected to or not
def connect(url):
try:
urllib.request.urlopen(url)
return True
except
On Tue, 14 Apr 2020 at 12:42, Rahul Gupta wrote:
>
> Hello all, i have a csv of 1 gb which consists of 25000 columns and 2
> rows. I want to apply pca so i have seen sciki-learn had inbuilt
> fucntionality to use that. But i have seen to do eo you have to load data in
> dat
64 bit version
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 14, 2020 at 9:41 PM Rahul Gupta wrote:
>
> Hello all, i have a csv of 1 gb which consists of 25000 columns and 2
> rows. I want to apply pca so i have seen sciki-learn had inbuilt
> fucntionality to use that. But i have seen to do eo you have to load data in
>
Hello all, i have a csv of 1 gb which consists of 25000 columns and 2 rows.
I want to apply pca so i have seen sciki-learn had inbuilt fucntionality to use
that. But i have seen to do eo you have to load data in data frame. But my
machine is i5 with 8 gb of ram which fails to load all this
djoy...@gmail.com wrote:
def buildVector(v) :
print(v[0],v[1],v[2])
If you want to be able to use the result of this function
in another computation, you need to return it, not print it:
def buildVector(v) :
return (v[0],v[1],v[2])
Similarly with buildRandomVector and vectorMagnitude
Luuk,
On 11/03/19 8:02 AM, Luuk wrote:
On 10-3-2019 19:30, djoy...@gmail.com wrote:
Please see the last line
When reading above, i was thinking about this joke:
...> ;)
Yes, I had a similar reaction to the wording: why not put *it* first.
Having lived and worked in many countries/culture
perfectly corrected that means my
function create right. But when I try to put vectorMagnitude(B) which I was
thinking to put new list from buildRandomVector(A),it returns an error. I have
been attempting to import buildRandomVector(A) to a list, but I can not
understand why the list can not apply
Dear Joyce,
On 11/03/19 7:30 AM, djoy...@gmail.com wrote:
...
A = [ 4, 5, 1]
#TASK0
def displayVector(v) :
print(v)
displayVector(A)
...
B = buildRandomVector(A)
def vectorMagnitude(v) :
tsum = 0
for i in v:
tsum = tsum + i**2
x = math.sqrt(tsum)
buildRandomVector(A) to a list, but I can not
understand why the list can not apply to vectorMagnitude(B).
Can you assist me in figuring the problem? Thank you!!
A = [ 4, 5, 1]
#TASK0
def displayVector(v) :
print(v)
displayVector(A)
#TASK1
def buildVector(v) :
print(v[0],v[1],v[2
On 14Jun2018 19:42, Dennis Lee Bieber wrote:
On Fri, 15 Jun 2018 05:39:08 +1000, Ben Finney
declaimed the following:
Don't choose the daily digest, because it makes a special “digest”
message for you each day. That message is disconnected from any other
message, and so you will not be able to
Dennis Lee Bieber writes:
> On Fri, 15 Jun 2018 05:39:08 +1000, Ben Finney
> declaimed the following:
>
> >Don't choose the daily digest, because it makes a special “digest”
> >message for you each day. That message is disconnected from any other
> >message, and so you will not be able to reply
On 14Jun2018 09:23, Tamara Berger wrote:
Thanks, Rhodri. One more question. What is a daily digest? I'm wondering
whether to choose that option.
Please don't use the digest mode.
They're a terrible way to read lists, and an even worse way to participate -
your replies will never be correctly
he
mailing list (and thus you will start receiving posts), which also
entitles you to send to the list. Sending email to that address will
send it to the list. So what you're seeing is not options, but steps -
first you subscribe, then you send email.
OK. And can you tell me how to apply
On Thursday, June 14, 2018 at 3:39:44 PM UTC-4, Ben Finney wrote:
> T Berger writes:
>
> > Thanks, Rhodri. One more question. What is a daily digest? I'm
> > wondering whether to choose that option.
>
> Don't choose the daily digest, because it makes a special “digest”
> message for you each day
T Berger writes:
> Thanks, Rhodri. One more question. What is a daily digest? I'm
> wondering whether to choose that option.
Don't choose the daily digest, because it makes a special “digest”
message for you each day. That message is disconnected from any other
message, and so you will not be ab
he
> >> mailing list (and thus you will start receiving posts), which also
> >> entitles you to send to the list. Sending email to that address will
> >> send it to the list. So what you're seeing is not options, but steps -
> >> first you subscribe, then yo
ending email to that address will
send it to the list. So what you're seeing is not options, but steps -
first you subscribe, then you send email.
OK. And can you tell me how to apply filters so that only replies to my emails
are included. I subscribed to the list a couple of weeks ago and then
ss will
> send it to the list. So what you're seeing is not options, but steps -
> first you subscribe, then you send email.
OK. And can you tell me how to apply filters so that only replies to my emails
are included. I subscribed to the list a couple of weeks ago and then had to
unsub
On Thu, Jun 14, 2018 at 3:47 PM, T Berger wrote:
> On Tuesday, April 10, 2018 at 1:21:53 AM UTC-4, Chris Angelico wrote:
>
>> I recommend, instead, joining the mailing list:
>>
>> https://mail.python.org/mailman/listinfo/python-list
>
> There seem to be two options on the Python-list Information P
On Tuesday, April 10, 2018 at 1:21:53 AM UTC-4, Chris Angelico wrote:
> I recommend, instead, joining the mailing list:
>
> https://mail.python.org/mailman/listinfo/python-list
There seem to be two options on the Python-list Information Page.
* Subscribe to the list (see sections below)
* Sen
On Tue, Apr 10, 2018 at 3:10 PM, T Berger wrote:
> This is the first time I've joined a google group and I don't understand the
> setup. Why are most of the posts in this group unrelated to python, and how
> do I filter this junk (sorry) out?
>
Probably most of them ARE junk. Google Groups has
This is the first time I've joined a google group and I don't understand the
setup. Why are most of the posts in this group unrelated to python, and how do
I filter this junk (sorry) out?
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Mar 28, 2018 at 7:18 PM, wrote:
> Hello all,
>
> This code is written for multivariate (multiple independent variables
> x1,x2,x3..xn and a dependent variable y) time series analysis using logistic
> regression (correlation and prediction).
> This code is based on one point location (o
Hello all,
This code is written for multivariate (multiple independent variables
x1,x2,x3..xn and a dependent variable y) time series analysis using logistic
regression (correlation and prediction).
#Import Libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
#Impo
> This is not an in-place operation: it returns a style which you can then
> render.
>
> style = df.style.apply(function2, axis=1)
> html = style.render()
>
> appears to work.
After your suggestion, rows are properly colored, but now I have lost all table
lines, font is smaller...
Is there an o
> This is not an in-place operation: it returns a style which you can then
> render.
>
> style = df.style.apply(function2, axis=1)
> html = style.render()
>
> appears to work.
This was a missing link.
Thank you very very much Thomas.
Regards and best wishes.
--
https://mail.python.org/mailm
On 30/10/17 08:44, zljubi...@gmail.com wrote:
> Hi,
>
> the following code never applies style and I cannot figure out why.
> Can someone please help?
>
> import pandas as pd
>
> def function2(row):
> if row.A == True:
> color = '#FF'
> else:
> color = '#00FF00'
>
>
Hi,
the following code never applies style and I cannot figure out why.
Can someone please help?
import pandas as pd
def function2(row):
if row.A == True:
color = '#FF'
else:
color = '#00FF00'
background_color = 'background-color: {}'.format(color)
return [b
Can you show us some of the code you tried?
On Monday, June 26, 2017 at 10:19:46 AM UTC+3, Bhaskar Dhariyal wrote:
> Hi everyone!
>
> I have a dataset which I want to make model trainable. I ahve been trying to
> do some thing for past 2-3 days.
>
> Actually I wanted to clean 'desc' and 'keywo
Hi everyone!
I have a dataset which I want to make model trainable. I ahve been trying to do
some thing for past 2-3 days.
Actually I wanted to clean 'desc' and 'keywords' column from the dataset. I am
using NLTK to vectorize, than remove stopwords & alpha numeric values and do
stemming. More
Terry Reedy wrote:
On 5/11/2015 8:42 PM, zipher wrote:
Huh? VPython successfully models particle motion simulation with
discrete events.
That's a discrete approximation to a continuous process.
The term "discrete event simulation" is usually used to
mean modelling a process that is inherently
On 11 May 2015 at 16:22, Tommy C wrote:
> Thanks for your help.
>
> I have updated the code as follows, there are no more errors but the images
> will not move at all, as all the images are staying at the upper left corner.
> Please advice, thanks.
>
>
> import sys, pygame
>
> pygame.init()
>
>
On 5/11/2015 8:42 PM, zipher wrote:
On Monday, May 11, 2015 at 7:25:09 PM UTC-5, Dennis Lee Bieber wrote:
On Mon, 11 May 2015 08:33:56 -0700 (PDT), zipher
declaimed the following:
You are making a error that few in the programming community have caught up to. OOP
design for *data abstraction
On Monday, May 11, 2015 at 7:25:09 PM UTC-5, Dennis Lee Bieber wrote:
> On Mon, 11 May 2015 08:33:56 -0700 (PDT), zipher
> declaimed the following:
> >You are making a error that few in the programming community have caught up
> >to. OOP design for *data abstraction* is a completely different be
On Friday, May 8, 2015 at 10:40:46 AM UTC-5, Tommy C wrote:
> I'm trying to apply OOP in this bouncing ball code in order to have multiple
> balls bouncing around the screen. The objective of this code is to create a
> method called settings, which controls all the settings for
.jpg")
patrick.speed[0] = 5
patrick.speed[1] = 8
patrick.control()
patrick.settings()
jaws = BALL("jaws.jpg")
jaws.speed[0] = 1
jaws.speed[1] = 10
jaws.control()
jaws.settings()
On Friday, May 8, 2015 at 11:40:46 AM UTC-4, Tommy C wrote:
> I'm trying to apply OOP in this bou
On Fri, 08 May 2015 08:40:34 -0700, Tommy C wrote:
> I'm trying to apply OOP in this bouncing ball code in order to have
> multiple balls bouncing around the screen. The objective of this code is
> to create a method called settings, which controls all the settings for
> t
On May 8, 2015 9:46 AM, "Tommy C" wrote:
>
> I'm trying to apply OOP in this bouncing ball code in order to have
multiple balls bouncing around the screen. The objective of this code is to
create a method called settings, which controls all the settings for the
screen and t
I'm trying to apply OOP in this bouncing ball code in order to have multiple
balls bouncing around the screen. The objective of this code is to create a
method called settings, which controls all the settings for the screen and the
bouncing behaviour of multiple balls, under the class
On 2015-02-24, Chris Angelico wrote:
> On Tue, Feb 24, 2015 at 8:09 AM, Sada Shirol wrote:
>> Upon some research found that I need to apply below patch:
>>
>> http://bugs.python.org/issue9729
>>
>> How do I apply a patch to python 2.6.6 on Linux?
>
> Hmm.
quality control and
efficiency Academy, known for short as [MQA ] to congratulate you on the
occasion of the new academic September year - 2014 . Its pleasure to tell you
that the university opening apply for university colleges.
The flowing colleges :
* faculty of Islamic Sciences
quality control and
efficiency Academy, known for short as [MQA ] to congratulate you on the
occasion of the new academic September year - 2014 . Its pleasure to tell you
that the university opening apply for university colleges.
The flowing colleges :
* faculty of Islamic Sciences
* faculty
quality control and
efficiency Academy, known for short as [MQA ] to congratulate you on the
occasion of the new academic September year - 2014 . Its pleasure to tell you
that the university opening apply for university colleges.
The flowing colleges :
* faculty of Islamic Sciences
* faculty
quality control and
efficiency Academy, known for short as [MQA ] to congratulate you on the
occasion of the new academic February year - 2014 . Its pleasure to tell you
that the university opening apply for university colleges.
The following colleges :
* Faculty of Islamic Sciences
s Python
> a dysfunctional programming language to apply FP? Can the more
> experienced Python users advise?
I recommend Scheme to learn functional programming style.
There's a short scheme tutorial that was entered in the
Interactive Fiction competition in 1998 or so. You can play it
o
language for FP. I am sort
>of confused at the moment. Is Python a dysfunctional programming
>language to apply FP? Can the more experienced Python users advise?
>--
>https://mail.python.org/mailman/listinfo/python-list
--
Sent from my Android phone with K-9 Mail. Please excuse
confused
> at the moment. Is Python a dysfunctional programming language to apply FP?
> Can the more experienced Python users advise?
For many years I taught programming in which a pure functional language was the
'mother-tongue' and was followed by a multi-paradigm language.
In the
On Mon, Feb 17, 2014 at 12:20 AM, Mark Lawrence wrote:
> On 16/02/2014 08:00, Pat Johnson wrote:
>>
>> This made me grin. ;)
>>
>
> What did, using google groups? :)
"Well! I've often seen context without a grin," thought Alice; "but a grin
without context! It's the most curious thing I ever saw
On 16/02/2014 08:00, Pat Johnson wrote:
This made me grin. ;)
What did, using google groups? :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from viruses and malware because avast! Antivirus
. I am sort of confused at the
moment. Is Python a dysfunctional programming language to apply FP? Can the
more experienced Python users advise?
Everything about FP that can be done in, say, Scheme, can be done in
Python, with the exception of tail recursion (but that isn't important
You c
This made me grin. ;)
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Feb 16, 2014 at 5:38 PM, Devin Jeanpierre
wrote:
> Otherwise you will likely be confused when you overhear functional
> programmers talking, whether it's about Hindley-Milner or sum types or
> eta conversion.
ETA conversion? I know what that is. That's when a programmer says
something'll
e moment. Is Python a dysfunctional programming language to apply FP?
> Can the more experienced Python users advise?
Everything about FP that can be done in, say, Scheme, can be done in
Python, with the exception of tail recursion (but that isn't important
for "real" FP). But
Python code *and* your
understanding of functional programming.
> I am sort of confused at the moment. Is Python a dysfunctional
> programming language to apply FP? Can the more experienced Python
> users advise?
I think if you want to learn functional programming you should have a
good r
e moment. Is Python a dysfunctional programming language to apply FP?
> Can the more experienced Python users advise?
>
Functional programming is a particular style. Python supports some of
that style, but it certainly doesn't enforce it; if you want to learn
how to work within a fun
I would like to learn and try out functional programming (FP). I love Python
and would like to use it to try FP. Some have advised me to use Haskell instead
because Python is not a good language for FP. I am sort of confused at the
moment. Is Python a dysfunctional programming language to apply
It's perfectly normal that you need to look things up, even the most
seasoned programmer has to look up something at some point.
Finding small projects is often difficult, because many projects grow to
such an extent, that they're simply to difficult to grasp for a beginner
and even for an experie
On Tue, Jan 29, 2013 at 5:57 PM, wrote:
> Hello,
> I am learning programming as a spare time hobby and learning python through
> codecademy.
>
> Today I have downloaded and installed aptana, and found out that although I
> have been progressing for some time now but I do not remember how to cod
Hello,
I am learning programming as a spare time hobby and learning python through
codecademy.
Today I have downloaded and installed aptana, and found out that although I
have been progressing for some time now but I do not remember how to code and I
have to look everything up.
I want to know
On Monday, 1 October 2012 19:49:27 UTC+5:30, BobAalsma wrote:
> Op vrijdag 21 september 2012 16:15:30 UTC+2 schreef Joel Goldstick het
> volgende:
>
> > On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote:
>
> >
>
> > > Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het
> > > vo
Op vrijdag 21 september 2012 16:15:30 UTC+2 schreef Joel Goldstick het volgende:
> On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote:
>
> > Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende:
>
> >> On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote:
>
> >>
>
> >> > Thanks
On 09/21/2012 02:57 PM, BobAalsma wrote:
> I'd like to write a programme that will be offered as a web service (Django),
> in which the user will point to a specific URL and the programme will be used
> to read the text of that URL.
>
> This text can be behind a username/password, but for severa
Op vrijdag 21 september 2012 22:10:04 UTC+2 schreef Dennis Lee Bieber het
volgende:
> On Fri, 21 Sep 2012 09:36:08 -0400, Jerry Hill
>
> declaimed the following in gmane.comp.python.general:
>
>
>
> > On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote:
>
> > > Thanks, Joel, yes, but as far as I
Op vrijdag 21 september 2012 17:28:02 UTC+2 schreef David Smith het volgende:
> On 2012-09-21 08:57, BobAalsma wrote:
>
> > This text can be behind a username/password, but for several reasons, I
> > don't want to know those.
>
> >
>
> > So I would like to set up a situation where the user logs
On 2012-09-21 08:57, BobAalsma wrote:
This text can be behind a username/password, but for several reasons, I don't
want to know those.
So I would like to set up a situation where the user logs in (if/when
appropriate), points out the URL to my programme and my programme would then be
able to
BobAalsma wrote:
> Hmm, from the previous posts I get the impression that I could best solve
> this by asking the user for the specific combination of username, password
> and URL + promising not to keep any of that...
>
> OK, that does sound doable - thank you all
Hmm, promising seems doable, b
On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote:
> Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende:
>> On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote:
>>
>> > Thanks, Joel, yes, but as far as I'm aware these would all require the
>> > Python programme to have the us
Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende:
> On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote:
>
> > Thanks, Joel, yes, but as far as I'm aware these would all require the
> > Python programme to have the user's username and password (or
> > "credentials"), whic
On Fri, Sep 21, 2012 at 9:31 AM, BobAalsma wrote:
> Thanks, Joel, yes, but as far as I'm aware these would all require the Python
> programme to have the user's username and password (or "credentials"), which
> I wanted to avoid.
No matter what you do, your web service is going to have to
authe
Op vrijdag 21 september 2012 15:23:14 UTC+2 schreef Joel Goldstick het volgende:
> On Fri, Sep 21, 2012 at 8:57 AM, BobAalsma wrote:
>
> > I'd like to write a programme that will be offered as a web service
> > (Django), in which the user will point to a specific URL and the programme
> > will b
On Fri, Sep 21, 2012 at 8:57 AM, BobAalsma wrote:
> I'd like to write a programme that will be offered as a web service (Django),
> in which the user will point to a specific URL and the programme will be used
> to read the text of that URL.
>
> This text can be behind a username/password, but f
I'd like to write a programme that will be offered as a web service (Django),
in which the user will point to a specific URL and the programme will be used
to read the text of that URL.
This text can be behind a username/password, but for several reasons, I don't
want to know those.
So I woul
Shashank Singh, 26.05.2010 23:16:
> I probably didn't state the problem properly. I was assuming the
> availability of a static method that could be passed on to map based
> solution (or imap for that matter).
>
> The question was, if one wants to apply a function on each
or imap for that matter).
The question was, if one wants to apply a function on each member of list
and discard the return value, is it possible to do it more efficiently than
having a for loop in python and applying the function of each of the
members?
Take this run:
from itertools import ima
> But some people may consider this too ugly to actually use in real code.
Which doesn't mean it can't get worse:
>>> from sys import maxint
>>> from operator import attrgetter
>>> from itertools import imap, islice
>>> class I:
... def __init
Shashank Singh, 26.05.2010 21:48:
What is the most efficient way of applying a function to all the elements of
an iterable while discarding the
result (i.e. operations are done only for side-effects).
For example if I want to save all elements in a list of items (and am not
interested in what sa
What is the most efficient way of applying a function to all the elements of
an iterable while discarding the
result (i.e. operations are done only for side-effects).
For example if I want to save all elements in a list of items (and am not
interested in what save() returns), the
simplest way is:
On Mar 31, 1:09 pm, Raymond Hettinger wrote:
> On Mar 30, 4:25 pm, s...@sig.for.address (Victor Eijkhout) wrote:
>
> > I have two arrays, made with numpy. The first one has values that I want
> > to use as sorting keys; the second one needs to be sorted by those keys.
> > Obviously I could turn th
On Mar 30, 4:25 pm, s...@sig.for.address (Victor Eijkhout) wrote:
> I have two arrays, made with numpy. The first one has values that I want
> to use as sorting keys; the second one needs to be sorted by those keys.
> Obviously I could turn them into a dictionary of pairs and sort by the
> first m
Victor Eijkhout wrote:
> Robert Kern wrote:
>
>> second[first.argsort()]
>
> Really cool. Thanks.
>
>> Ask numpy questions on the numpy mailing list.
>
> I will. I thought that this question would have an answer in a generic
> python idiom.
>
> Victor.
Not an unreasonable assumption, but it
On 2010-03-31 13:58 PM, Victor Eijkhout wrote:
Robert Kern wrote:
second[first.argsort()]
Really cool. Thanks.
Ask numpy questions on the numpy mailing list.
I will. I thought that this question would have an answer in a generic
python idiom.
When dealing with numpy arrays, the generic
Robert Kern wrote:
> second[first.argsort()]
Really cool. Thanks.
> Ask numpy questions on the numpy mailing list.
I will. I thought that this question would have an answer in a generic
python idiom.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
--
http://mail.python.org/mailman
On 2010-03-30 18:25 , Victor Eijkhout wrote:
I have two arrays, made with numpy. The first one has values that I want
to use as sorting keys; the second one needs to be sorted by those keys.
Obviously I could turn them into a dictionary of pairs and sort by the
first member, but I think that's n
On Tue, Mar 30, 2010 at 9:59 PM, Chris Colbert wrote:
>
>
> On Tue, Mar 30, 2010 at 7:25 PM, Victor Eijkhout wrote:
>
>> I have two arrays, made with numpy. The first one has values that I want
>> to use as sorting keys; the second one needs to be sorted by those keys.
>> Obviously I could turn t
On Tue, Mar 30, 2010 at 7:25 PM, Victor Eijkhout wrote:
> I have two arrays, made with numpy. The first one has values that I want
> to use as sorting keys; the second one needs to be sorted by those keys.
> Obviously I could turn them into a dictionary of pairs and sort by the
> first member, bu
Victor Eijkhout wrote:
I have two arrays, made with numpy. The first one has values that I want
to use as sorting keys; the second one needs to be sorted by those keys.
Obviously I could turn them into a dictionary of pairs and sort by the
first member, but I think that's not very efficient, at
Victor Eijkhout wrote:
> I have two arrays, made with numpy. The first one has values that I want
> to use as sorting keys; the second one needs to be sorted by those keys.
> Obviously I could turn them into a dictionary of pairs and sort by the
> first member, but I think that's not very efficien
* Victor Eijkhout:
I have two arrays, made with numpy. The first one has values that I want
to use as sorting keys; the second one needs to be sorted by those keys.
Obviously I could turn them into a dictionary of pairs and sort by the
first member, but I think that's not very efficient, at leas
I have two arrays, made with numpy. The first one has values that I want
to use as sorting keys; the second one needs to be sorted by those keys.
Obviously I could turn them into a dictionary of pairs and sort by the
first member, but I think that's not very efficient, at least in space,
and this
On Sep 9, 8:14 pm, Steven D'Aprano
wrote:
> On Wed, 09 Sep 2009 14:58:22 -0700, Carl Banks wrote:
> > Use case seems perfectly obvious to me. You have a set of functions
> > that use different strategies to accomplish a task, and there is a lot
> > of overlap in the arguments used but no consiste
1 - 100 of 202 matches
Mail list logo