Hi Todd,
Did you get your searches running?
Have you had a chance to look at my exam?
Are you planning to go next door for beer some day next week? If so,
do you
know when. I'd like to stop by and chat.
Best,
Vincent
--
their names are sequential integers
if j.alive:
if random.random() >= BRANCHING_PROBABILITY:
currentTree.AddBranch(j, (currentTree.NumLinages() +
1)) # creates a new node
j += 1
Thank you for the help
Vincent Wan
--
MBER_REPS):
j = 0
while j <= currentTree.NumLinages(): # checks all node because
their names are sequential integers
if j.alive:
if random.random() >= BRANCHING_PROBABILITY:
currentTree.AddBranch(j, (currentTree.NumLinages() +
1)) # creates
n range(NUMBER_REPS):
j = 0
while j <= currentTree.NumLinages():
if random.random() >= BRANCHING_PROBABILITY:
currentTree.AddBranch(j, currentTree.NumLinages() + 1)
j += 1
Vincent Wan
-
m() >= BRANCHING_PROBABILITY:
currentTree.AddBranch(j, currentTree.NumLinages() + 1)
j += 1
thank you,
Vincent Wan
--
PhD Candidate
Committee on the Conceptual and Historical Studies of Science
Univ
Thank you Roel Schroeven
I don't know how I missed the fact that the printDendrogram function
needs tuples not strings.
I didn't recognize that my string was a tuple so I didn't realize
that when I pasted it interactively
in IDEL I was allowing python to change the type.
eval() changes the ty
if random.random() < EXTINCTION_PROBABILITY:
print 'At ', time,' linage ', linages[j], 'died '
del linages[j]
if len(linages) == 0:
"restarts if fewer that 10 linages evolved"
. Gould
# 1974 Systematic Zoology 23: 305-322.
# written by Vincent Wan with help from tutor@python.org
import random
debug = 0# turns debug diagnostic printing on = 1 or off = 0
#constants that control the simulation
max_linages = 201# the number of linage to be evolved + 1
sorry to inflict another dumb bug on you all so soon...
I have written a program to replicated simulate the evolution of
species and their genomes based on David Raup and Stephen Jay Gould's
1974 paper in systematic zoology 23: 305-322. The program correctly
evolves species and keeps track of
If I have a list stuff = [[0,sdfsd,wrtew], [1, rht,erterg]] whats the
most concise way to print the first elements:
[0, 1]
if triedprint stuff[:][0] but that just prints the whole list.
Vincent
--
PhD Cand
Dear All,
python gives me a type error that I don't understand
running my program gives me "TypeError: len() of unsized object"
but I know I that the object whose length I asked for is a list and
therefor a sized type
here is a sample of the output:
type (living_species) :
len(living_species) :
PROBLEM SOLVED THANK YOU DANNY AND ALAN
To recap:
My program main loop called two functions one that changed a list and
one that printed the list. Turns out that print function was bad.
I didn't understand how clever pythons for statement is. I wrote:
def write_list(list_to_write, file_name):
Dear Danny,
On Jan 6, 2005, at 12:59 PM, Danny Yoo wrote:
Can you show us a snippet of the file output? I'm not immediately
seeing
anything particular with your debugging output statements:
Like the computer, I don't yet understand what the problem is. *grin*
If you can point us at the outpu
return a_genome
myfile = open('myfile', 'w')
current_time = 0
while current_time < total_time:
myfile.write('\nTime is ' + str(current_time) + ' the genome is ')
# debug
write_list(genome, myfile)
leng
14 matches
Mail list logo