Python Forum
Multiplying two lists to make an array
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiplying two lists to make an array
#11
I tried measuring the time each routine takes using the following code

import time
start = time. time()

...
    
end = time. time()
print(end - start)
but I found the times changed each time I ran the same routine.

cheers Peter
Reply
#12
Run each one 3-5 times and find the average time, I would, but I'm at school right now. We're watching "The Greatest Showman" in band.
Reply
#13
(May-14-2019, 12:08 AM)michalmonday Wrote: Are you for real? Just because it was posted in "Homework" section doesn't mean that the guy's homework was to do 1 simple operation. If he posted "what is 2+2?" would you also issue warnings for people who reply with "4"? Edit: It isn't even in the homework section, so it's as if helping in the "General Coding Help" was forbidden lol. And what kind of effort you expect from the guy who asks about such simple thing? He described it clearly, showed example of expected output.
Lots of homework ends up in non-homework sections. Lots of people who want their homework done for them insist that it's not homework. If they ask how to do addition, yes, I'll just say how to do so, but this solidly crosses the complexity line for me (this is an algorithm not an operation), especially since I can easily see this as a homework assignment.

I expect code. If they haven't written any code, unless it's something trivial, we should be having them write some of their own code first. Other mods are welcome to chime in here, perhaps I'm in the wrong.
Reply
#14
(May-14-2019, 09:55 PM)micseydel Wrote:
(May-14-2019, 12:08 AM)michalmonday Wrote: Are you for real? Just because it was posted in "Homework" section doesn't mean that the guy's homework was to do 1 simple operation. If he posted "what is 2+2?" would you also issue warnings for people who reply with "4"? Edit: It isn't even in the homework section, so it's as if helping in the "General Coding Help" was forbidden lol. And what kind of effort you expect from the guy who asks about such simple thing? He described it clearly, showed example of expected output.
Lots of homework ends up in non-homework sections. Lots of people who want their homework done for them insist that it's not homework. If they ask how to do addition, yes, I'll just say how to do so, but this solidly crosses the complexity line for me (this is an algorithm not an operation), especially since I can easily see this as a homework assignment.

I expect code. If they haven't written any code, unless it's something trivial, we should be having them write some of their own code first. Other mods are welcome to chime in here, perhaps I'm in the wrong.
I agree with you entirely. Even if it isn't homework, the job of helpers on here is to teach and help, not make people lazy.
Reply
#15
(May-14-2019, 09:55 PM)micseydel Wrote: but this solidly crosses the complexity line for me (this is an algorithm not an operation)

I expect code. If they haven't written any code, unless it's something trivial, we should be having them write some of their own code first. Other mods are welcome to chime in here, perhaps I'm in the wrong.

It's called "outer product of vectors" and if OP only knew that name he'd google it himself and find answer in 10 seconds. Does it mean that google is demoralizing and making people lazy? Should google introduce system where in order to find "numpy.outer" function you have to supply a piece of code trying to implement it yourself? Should any forum introduce such system?

It's a shame that official forum of such beautiful thing as python has staff that exhibits the same trait I observe too frequently... Give a little bit of power to people and they're going to abuse it as much as they can without causing themselves repercussions.
Reply
#16
My whole goal is education. Google is search, I think your suggestion is ridiculous and not in good faith. It's not a power trip, I don't believe people learn well they make no effort (see Make It Stick for more of what I'm talking about). I mean well, and you suggesting otherwise is not productive.

If you wish to continue discussion on this topic, please create a separate thread in the board section.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How do i make a new lists out of an list ozezn1 1 1,722 Oct-28-2020, 10:19 PM
Last Post: Gribouillis
  Multiplying between two values doug2019 7 2,851 Oct-20-2020, 05:49 PM
Last Post: doug2019
  Split dict of lists into smaller dicts of lists. pcs3rd 3 2,433 Sep-19-2020, 09:12 AM
Last Post: ibreeden
  Make an array of string number in a List polantas 5 3,137 May-27-2020, 07:18 AM
Last Post: buran
  List structure lost when multiplying Protonn 2 2,274 Apr-23-2020, 04:16 AM
Last Post: buran
  multiplying elements in a list Olavv 3 3,451 Feb-27-2020, 04:55 PM
Last Post: DeaD_EyE
  sort lists of lists with multiple criteria: similar values need to be treated equal stillsen 2 3,318 Mar-20-2019, 08:01 PM
Last Post: stillsen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020