ds Geofram
On 3/13/07, Eike Welk <[EMAIL PROTECTED]> wrote:
On Tuesday 13 March 2007 11:57, Geoframer wrote:
> Hey everyone,
>
> I've been trying to locate a way to find the location of the
> minimum value in an n*n array.
The 'argmin' function is probably wh
Hey everyone,
I've been trying to locate a way to find the location of the minimum value
in an n*n array.
For instance suppose we have a 10x10 array.
In [1]: import numpy
In [2]: a = numpy.zeros((10,10))
In [3]: a
Out[3]:
array([[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0.
like so :
print "AI chose %s, you chose %s. %s", %(values.get(cchoice),values.get
(hchoice),combinations.get((cchoice,hchoice)))
Probably this is not unlike Alan suggest, but i got confused when i read
about tables. Unless he means dictionaries instead.
HTH - Geoframer
On 2/15/07, Rikard Bosnj
urn 1
else:
print "Porao inexistente!"
if porao():
define()
compativel()
*** end inserted code ***
HTH - Geoframer
On 1/19/07, Geoframer <[EMAIL PROTECTED]> wrote:
Accidentally the number of function definitions does not help the clarity
of the program, even though it&
112
comprimento = 211
return 1
elif porao == 4:
altura_aeronave = 112
largura_aeronave = 113
comprimento = 212
return 1
else:
print "Porao inexistente!"
if porao():
define()
compativel()
On 1/19/07, Geoframer <[EMAIL PROTECT
Alright this code is actually littered with bugs, but don't feel bad,
because as you state you are new to the whole programming thing. I'll try to
explain the things i see going wrong (please take into account that i'm also
a new pythonist ;-))
***
You get the error 'variable undefined' because y
Or actually an even easier way is to just to divide bij a float and the end
result will also be a float.
So in your case divide bij 1024.0 ;-)
In [21]: s=14105
In [22]: s/1024.0
Out[22]: 13.7744140625
HTH - Geofram
On 1/18/07, Geoframer <[EMAIL PROTECTED]> wrote:
You assign s
You assign s as an integer... it should be a float to get the right
result...
So either define s as
s = 14105.0
or as
s = float(14105)
it'll then result in the right answer :
In [17]: s=14105.0
In [18]: s/1024
Out[18]: 13.7744140625
In [19]: s = float(14105)
In [20]: s/1024
Out[20]: 13.7744
I actually had Numeric under WinXP also, manually installed it and could
import Numeric so that wasn't it imho.
On 1/11/07, Hugo González Monteverde <[EMAIL PROTECTED]> wrote:
Geoframer wrote:
>
> However i switched to Ubuntu 6.10 today (from WinXP) and to my suprise
> it d
0}
Older version somewhat but apparently this works, so it might just be a bug
under windows or in the newer version from Rpy... For now at least I can
work with it.
Thanx a bunch for all your help Kent.
Regards - Geofram
On 12/25/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Geoframer wrote
ost recent call last):
File "rpy-test2.py", line 9, in ?
r.kmeans(a, 2, 5, 10, "Forgy")
rpy.RException: Error in as.double.default(x) : (list) object cannot be
coerced
to 'double'
Hope you can shed more light on it.
Many thanx for your efforts - Geofram
On 12/2
Okay this might not be the best place to post my question, but on the
rpy-list i'm getting no response and i'm really stuck with this problem.
Perhaps anyone on here has run into the same problem... I'm thinking my
newbieness to python probably is one of the reasons why i fail to see
what i'm doin
have the programs checked online to see if they are valid. The programming exercises are not specific to python but more of the kind you find in programming contests. You can still get valuable lessons from them though.
Have fun - Geoframer
On 10/10/06, Asrarahmed Kadri <[EMAIL PROTECTED]>
'and 'Dive into python' (www.diveintopython.org).So i'm hoping i can soon help people the way you guys helped me ;-)
Once again thanks everyone for their suggestions and time!!!Regards - GeoframerOn 10/8/06, Tim Peters <
[EMAIL PROTECTED]> wrote:[Geoframer]> The last few d
Erm i made a typo
Sample input should ofcourse be without the '!''s
So input =
5
3
5
50
100
125
Sorry - Geoframer
On 10/8/06, Geoframer <[EMAIL PROTECTED]> wrote:
The problem is that these assignments are evaluated automatically. So i can not use description strings
The problem is that these assignments are evaluated automatically. So i can not use description strings to clearify output or input etc.
Basically it's like this:
a = the number of times i'm going to read input to evaluate
lst = the factors of 5. I.e. (5, 5^2, 5^3, 5^4 etc) until the last
The main problem from what i can tell is that the number of '(' and ')' you use in declarations (and maybe even functions) are not correct.Take for instance :u0prime = beta*(sqrt(d**2 +(h +length1)**2) - h +length1))
You open 3 '(' and close 4 ')' .The problem is not the little test code at the en
Hi everyone,The last few days i've been learning python and have been doing this by trying to solve problems for a programming competition.One particular problem is bugging me. I have already solved it but my solution does not compute in the set time-condition. I know
for a fact that this particula
18 matches
Mail list logo