Re: [sage-support] algorithme

2019-01-19 Thread Anton Sherwood

On 2019-1-19 15:52, MAMANE DJAMILOU Salissou Dango wrote:

Bonjour,
je suis un tous nouveau utilisateur de sagemath. Je maîtrise les 
opérations indépendantes. Mon souci se trouve au nivaux des algorithmes. 
je n'arrive, jusque là pas à comprendre comment programmer avec sageMath 
(voir les ''screenshots'').

merci de m'aider à démarrer.


An attempt at translation:
Good day,
I am a very new user of sagemath.  I am mastering independent 
operations.  My trouble is on the level of algorithms.
So far, I cannot understand how to program with sageMath (see the 
screenshots).

Thanks for helping me to get started.


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Piecewise polynomials in general

2018-01-25 Thread Anton Sherwood
Speaking of piecewise functions, does anyone happen to know of a 
piecewise polynomial object for Python?  I tried writing one (based on 
numpy.poly1d) but its integration method seems to have a bug.  It 
surprises me that I haven't found one on the fertile Web.


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: this circuit used to work but it doesn't anymore ?

2017-02-06 Thread Anton Sherwood
The content is not the problem.  The problem is that, for many mail 
readers, your query about "this circuit" is buried within the thread 
"Error building OpenBias", so someone not interested in building 
OpenBias may not see it.  To start a new topic, don't reply to an old one.


On 2017-2-05 02:21, Henri Girard wrote:

Sorry I didn't notice it. I believed I had delete all contents of
previous message.



Le 05/02/2017 à 10:28, Dima Pasechnik a écrit :

This is merely to point out that this message has little to do with
the original thread.
And its subject is hidden from the reader, unless you click on the
topic about OpenBlas
and see this:...

Please make sure to post such things separately, not inside an
irrelevant thread...




--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Comparing many lists to each other

2016-10-01 Thread Anton Sherwood

On 2016-10-01 12:27, saad khalid wrote:

That's about my idea right now. Do you have any tips or tricks to make
it faster? Are there any list comprehension tricks I'm missing? Thanks
in advance!


If you're interested in the number of sub-lists that have the first n 
elements in common, sort the list and compare only nearby rows; 
something like this:


mytaylors.sort()
matchcounter = [0] * 21
for j in xrange(len(mytaylors)):
for k in xrange(j+1,len(mytaylors)):
if mytaylors[j][0] != mytaylors[k][0]:
break
for n in xrange(1,20):
if mytaylors[j][n] == mytaylors[k][n]:
continue
matchcounter[n] += 1
break
else:
matchcounter[20] += 1


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: logged out

2016-09-12 Thread Anton Sherwood

On Monday, September 12, 2016 at 5:59:42 AM UTC, Anton Sherwood wrote:

Oh heck. I used my local Sage "server" yesterday, and (thinking
nothing of it) signed out before shutting it down; and now it wants
me to sign in. I don't remember ever signing in before, and have no
idea what it thinks my username is!


On 2016-9-12 06:58, Dima Pasechnik wrote:

admin
(most probably, IMHO)


And now when I fire it up I'm logged in, apparently as admin.
Funny old world.

I wonder whether there's a password.

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] logged out

2016-09-11 Thread Anton Sherwood
Oh heck.  I used my local Sage "server" yesterday, and (thinking nothing 
of it) signed out before shutting it down; and now it wants me to sign 
in.  I don't remember ever signing in before, and have no idea what it 
thinks my username is!


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] linear solutions

2016-09-10 Thread Anton Sherwood
I haven't guessed the right keywords.  How do I solve a set of linear 
equations in which the coefficients are symbolic expressions like 
a^2-sqrt(b)?


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Series expansion is incorrect?

2016-05-24 Thread Anton Sherwood

saad khalid wrote:

I want to take get the Laurent series expansion of it. It can be
seen through Wolfram Alpha here:

http://www.wolframalpha.com/input/?i=laurent+series+expansion+of+%282t^3%2B1%29%2F%28%28t^2%2Bt%2B1%29^2%28t-1%29^2%29


On 2016-5-24 09:28, Nils Bruin wrote:

Your wolfram alpha output looks like an unreadable URL


I guess your mail-reader, like mine, thinks "^" is not valid in a URL;
but pasting works.

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Partial differentiation on Sage

2016-03-01 Thread Anton Sherwood

On 2016-2-29 15:13, saad khalid wrote:

r,theta,y =var("r,theta,y")
x =r*cos(theta)
f1 =x^2+y^2
f1(x).diff(x)
|

I'm getting 2x as the output, when what I want is -2x. What am I doing
wrong?


When you take the partial derivative of f1 with respect to x,
you hold y constant and ignore r.

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Partial differentiation on Sage

2016-02-29 Thread Anton Sherwood

On 2016-2-29 15:13, saad khalid wrote:

Hey everyone. So, here's the problem I have:

z = x^2 + y^2
x = r*cos(theta)
y = r*sin(theta)

I need to calculate the partial derivative (dz/dx) while holding r
constant.  [...]


Seems to me what you want is z_theta / x_theta, i.e., the ratio of two 
partial derivatives with respect to theta, which of course assumes 
constant r.


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage error HELP

2015-08-13 Thread Anton Sherwood

On 2015-8-13 04:22, Luis Molina wrote:

def slopeline(x=(-5,5)):
p=plot(x^n, (n,0,6), ymin=-5^4, ymax= 5^4)
show(p)



What is (-5,5)^n supposed to be?

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] bug in == operator?

2015-07-13 Thread Anton Sherwood

For fun I found the continued fraction expression
of the ratio of these two big integers:

1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 1, 3, 12, 5, 1, 2, 1, 19,
3, 3, 3, 1, 1, 3, 2, 2, 3, 1, 5, 1, 4, 28, 2, 1, 3, 1, 2,
2, 1, 1, 1, 1, 10, 4, 1, 5, 6, 13, 1, 1, 2, 23, 1, 3, 16,
1, 29, 14, 4, 1, 3, 2.

It agrees with sqrt(2) for 70 steps.


On 2015-7-12 23:54, David Goldberg wrote:

This is in SageMath Version 6.6, Release Date: 2015-04-14 running on a
MacBook.  The following lines print 'equal', even though m and m1 do not
appear equal to me!

m=540579833922455191419978421211010409605356811833049025*sqrt(1/2)
m1=382247666339265723780973363167714496025733124557617743
if m == m1:
print "equal"


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage 5.9

2015-05-22 Thread Anton Sherwood

On 2015-5-22 09:09, jlassi ines wrote:

Please I have a big problem with Sage 5.9, I used to work on this
version and all my codes are online and I never found a problem except
that this week I can not enter there and it shows me this error message.
Le serveur est temporairement incapable de traiter votre demande en
raison de temps d'arrêt de maintenance ou des problèmes de capacité.
S'il vous plaît réessayer plus tard.


"The server is temporarily unable to handle your request because of a 
maintenance shutdown period or problems of capacity. Please try again 
later."


When you say "this week", do you mean you've been seeing this message 
for days?


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Appending to lists

2015-05-15 Thread Anton Sherwood

On 2015-5-15 21:07, Phoenix wrote:

What is wrong with this code?
'''
I am trying to see if I can create a list of tuples such that the first
coordinate of eachh tuple is itself a list of lists.
Then inside the loop I am trying to update a tuple such that I will add
a new list to its first coordinate and change its other coordinate.
'''


I think this is closer to what you want:

c = []
for (x,y) in b:
x.append( [4,5,6] )
c.append( (x,y+1) )
b = c

Or:
b = [ (x+[[4,5,6]],y+1) for (x,y) in b ]

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Appending to lists

2015-05-15 Thread Anton Sherwood
Phoenix: no, x.append() *operates on* x but does not *return* the new x 
as a value (as you might expect in C); the value of x.append() is None.


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Can someone help understand this error ? (that is generated for large inputs)

2015-05-14 Thread Anton Sherwood
Is it only because I'm old that I see something inelegant about a post 
that re-quotes (without commenting on any but the newest) eight 
generations of quoted matter, including ninety blank lines and four 
copies of "You received this message because"?


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] What does izip do as compared to zip ?

2015-05-12 Thread Anton Sherwood

On 2015-5-12 18:42, Phoenix wrote:

I mean after doing either a izip or a zip to create the list "k"
can I run a loop through "k" like this ?

for (a,b) in k


Yes, that's what izip is for.

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] What does izip do as compared to zip ?

2015-05-12 Thread Anton Sherwood

On 2015-5-12 18:39, Phoenix wrote:

So is functionally izip exactly the same as zip but faster?


NO.

zip() builds a list, an object that takes up space proportional to the 
number of entries.


itertools.izip() makes an iterator: a function that generates the items 
that would be in the list, but one by one as needed (see "yield"), never 
saving them; the speed advantage is in the absence of memory management.


You can do some listlike things with the output of izip(), but not all; 
you can't concatenate it or sort it, for example.


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] What does izip do as compared to zip ?

2015-05-12 Thread Anton Sherwood

On 2015-5-12 17:30, Phoenix wrote:

So what is the way to display the result of the izip ?


I changed
print izip(A,X)
to
for j in izip(A,X):
print j

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] What does izip do as compared to zip ?

2015-05-12 Thread Anton Sherwood
Does your show() do operations on the input other than "for item in 
inputlist"?


I replaced the meat of your loop with
print "X=", X
print "k=", zip(A,X)
print "ik=", izip(A,X)

and this was the output of the first iteration:
X= ('a', 'b', 'a')
k= [(1, 'a'), (2, 'b'), (3, 'a')]
ik= 

On 2015-5-12 16:56, Phoenix wrote:


I was under the impression that izip is a better alternative than zip
when the two sets are large.
But thats not what its turning out to be.
(in practice I would have A to be a set of size ~200-300 and B would be
of size ~10-50 )

A = [1,2,3]
B = ["a","b"]
from itertools import product
from itertools import izip

for X in product(B,repeat = len (A)):
 k = izip(A,X)
 show(k)

[THE ABOVE izip  VERSION DOESN'T WORK!]

VS

A = [1,2,3]
B = ["a","b"]
from itertools import product

for X in product(B,repeat = len (A)):
 k = zip(A,X)
 show(k)

[THE ABOVE zip VERSION WORKS]

Can someone help?



--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Decimal Answers

2015-05-11 Thread Anton Sherwood

On 2015-5-11 17:21, Michael Orlitzky wrote:

The "e10" at the end is scientific notation. I don't know where
the 'e' came from, but I would guess it stands for "exponent"
and I would bet we use 'e' because there was no way to write
a superscript when hand-held calculators were invented.


O youth!  It was used in Fortran about twenty years before that.
(For double precision numbers the E became D, iirc.)

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] extension de corps

2014-03-20 Thread Anton Sherwood

On 2014-3-20 02:07, John Cremona wrote:

You are going to have to make your question more specific:  which
field are you starting from and wgat kind of extension are you trying
ot make?  Which version of Sage are you using?


(traduction bien libre)
"Vous devrez poser une question plus précise: quel espèce d'extension, à 
partir de quel corps?  De quelle version de Sage servez-vous?"


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] extension de corps

2014-03-19 Thread Anton Sherwood

On 2014-3-19 13:26, ghammamlou...@gmail.com wrote:

Bonsoir
SVP, j'ai besoin de definir sur Sage 3 extensions de corps,

> mais je n'arrive pas. Je peux definir que deux extensions.

"Good evening
"If you please, I need to define on Sage 3 extensions of body[?],
 but I do not succeed.  I can define only two extensions."


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Random sum of functions

2013-07-17 Thread Anton Sherwood

On 2013-7-17 02:07, Laurent Decreusefond wrote:

For any tuple of integer (a_1,a_2, ..., a_k),  [...]
I want to form the function

z -> sum_{i=1}^k |f(a_i, z)|^2


Won't this work?

def ff(atuple,z):
return sum([ abs(f(n,z))**2 for n in atuple ])

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Connection among the vertices on a plane or hyperplane

2013-03-06 Thread Anton Sherwood

On 2013-3-06 17:51, Asad Akhlaq wrote:

Thanks for your reply. One more question please. In the original
simplex I have 9 vertices and each vertex is connected to 8 others.
In the new polytope, after cut by hyperplane, I have 5 vertices from
the original simplex (that are connected to each other) plus 16 new
vertices. Now how can I know if I have a one-to-one connection among
all the  21 vertices in the new polytope? Is there any procedure to
investigate that whether there is a connection among vertices?


The easiest way is probably a convex hull algorithm (as you suggested
before), assuming that it provides all the elements (edges etc.) and not 
only the bounding hyperplanes (which you already have!).


--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Connection among the vertices on a plane or hyperplane

2013-03-05 Thread Anton Sherwood

On 2013-3-05 16:04, Asad Akhlaq wrote:

...  My ultimate goal is to find the volume of this new piece.
To find the volume of this piece, can I just take a convex hull
of these 21 vertices and find the volume of that piece? Will it
give me the correct result?


Yes: since the original object (a simplex) is convex,
any piece sliced from it (by a planar cut) will also be convex.

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Connection among the vertices on a plane or hyperplane

2013-03-05 Thread Anton Sherwood

On 2013-3-04 22:21, Asad Akhlaq wrote:

I am solving a problem where I want know that whether certain
vertices on a hyperplane are connected to each other or not (i.e
there exists an edge between two vertices). Say in a 2D plane, if I
have 3 or more vertices (points), how can I decide that if all or
some of these vertices are connected to each other? Similar is the
problem for a hyperplane. Do we have any function/class is sage that
can do it? I heard about convex hull algorithms but I don't know how
to apply them to this problem. OR can we use graphs to solve this
problem?


Vertices and edges of what?  Seems to me you need either a graph or a 
convex hull for the question to have any meaning!


How does the problem arise?

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Re: polychoral symmetry groups

2012-12-20 Thread Anton Sherwood
Okay,  sage.groups.matrix_gps.matrix_group.MatrixGroup() appears to be
what I need.  Thanks for the keyword!

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] polychoral symmetry groups

2012-12-20 Thread Anton Sherwood
I have a project in mind that involves the symmetry groups of the
regular four-dimensional polytopes.
I'm told that enumeration of a group from its generators is a
by-product of the Todd-Coxeter algorithm.
Unfortunately, I can't make sense of Wikipedia's description of TC,
nor of the one implementation of it that I've seen (in C++;
jenn3d.org).

I hope that this is not the wrong place to ask, and that one of you
can point me to an implementation of Todd-Coxeter in Sage or Python
(Sage preferred, as I'd like to have the square roots handled
algebraically rather than numerically) -- or, as long as I'm wishing,
a list of the 14400 isometry matrices of the [5,3,3] group.

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] How do you stop sage in the middle of a block?

2012-11-20 Thread Anton Sherwood

On 2012-11-20 10:48, LFS wrote:

How do you get sage out of a loop early?
How do you get sage to totally stop in the middle of a block?


Two ways have been mentioned; yet another is a custom Exception:

class IWantOut(Exception):
pass

try:
loop ...
...
raise IWantOut
...
except IWantOut:
respond to that condition

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Application/Use of Sage in IT company or Industries

2012-05-10 Thread Anton Sherwood

On 2012-5-10 04:59, Nathann Cohen wrote:

I would not use it myself if I were not adding code to it, and I add
code to it because through the years it remains unable to do what I
would like it to do without having to code it myself.


It's turtles all the way down!

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Using mpi4py in sage 'online' notebook (atsagenb.org)

2012-03-19 Thread Anton Sherwood

On 2012-3-18 22:57, Simon King wrote:

Why has the original post been marked as spam?


Possibly the phrase "I just started using  and am loving it!" is a 
red flag.  (I didn't see it marked as spam.)


--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Polyhedron.radius() bug?

2012-02-10 Thread Anton Sherwood

On 2012-2-10 05:27, rickhg12hs wrote:

"Return the maximal distance from the center to a vertex."

Shouldn't this be translation invariant?


Could 'center' here mean 'origin'?  It's not obviously unreasonable to 
assume that a polyhedron is defined so that they coincide.


--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] functions

2012-02-08 Thread Anton Sherwood

Chappman wrote:
>> Yes I do want a function of some sort here, but I do not
>> want a "def chaps(u,v)" like what anton has done for now, [...]

On 2012-2-08 02:39, Robert Bradshaw wrote:

It sounds like what you're saying is "I want a function,
but I don't want a function."  [...]


Or "I want a function, but I don't like Python's function syntax."

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] functions

2012-02-07 Thread Anton Sherwood

On 2012-2-07 01:18, Chappman wrote:

Hi Rob,

with this syntex:


x=0
for y_1 in [1..2]:
 for y_2 in [1..y_1]:
  x += [y_1,y_2]
print x


what I am trying to do is, trying to use the two numbers y_1 and y_2
in x +=[y_1,y_2]
to assign it a number from previously set conditions


if y_1 = y_2:
 y_1 = y_2 = 2
elif y_1>y_2:
 y_1 = y_2 = 1


but currently my code is having trouble doing that.
Is there a way to do this please?


Are you trying to define [u,v] as a function whose value is 2 if the 
arguments are equal and 1 if u>v?  (What if vproblems, you can't do that with [], because that symbol is reserved for 
lists.


Here's how I'd do what I think you're trying to do:

# define a function of two inputs
def chap(u,v):
if u==v: return 2
# no 'else' needed, because 'return' breaks out of the function
if u>v: return 1
return None # ought to be a numeric value

x=0
for y1 in range(1,3):
for y2 in range(1,y1+1):
    x += chap(y1,y2)
print x

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] help with filtering between two lists.

2012-01-02 Thread Anton Sherwood

On 2012-1-02 09:24, Eric Kangas wrote:

l1 = [int(x) for x in p]
l2 = [int(x) for x in d]
l3 = []
x = 0
for x in l1,l2:


This will give x the values l1 and l2,
which are not valid indices.

> if l1[x:x+1]==l2[x:x+1];
> l3.insert(x, (x,l1[x:x+1],l2[x:x+1]));

Why ranges (which are lists) rather than simple items?
Why record two numbers that are always equal (or else unrecorded)?

Is "l3.insert(x, ...)" valid when len(l3) < x?

Others have suggested how to do it with a one-liner.
Here's better syntax for the 'naive' approach:

for x in range(min(len(l1),len(l2)):
if l1[x] == l2[x]:
l3.append((x,l1[x]))
    print l3

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Power series expansion

2011-12-03 Thread Anton Sherwood

On 2011-12-02 08:17, Julie wrote:

Unfortunately, having the Tayor series approach out, don't think it's
really appropriate for my problem afterall, as what I esentially need
to do is find the coefficientsof p^0*y^0, p, y, p^2*y etc in the
formula
(0.030*0.248244^y)y+0.05721*(0.248244^y)p +0.08838*(0.248244^y)

> [...]

Since this is not a polynomial in p and y, what does it mean to obtain 
the coefficients of p^j y^k *if not* those of something very similar to 
a Taylor series?


--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Installing latest sage

2011-11-28 Thread Anton Sherwood

On 2011-11-28 03:02, Dima Pasechnik wrote:

Indeed. That tablet runs Pentium M, which is kind of old nowadays.


Has the instruction set changed in recent years?  I assumed it had 
stabilized awhile back.


--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] complex parts

2011-09-15 Thread Anton Sherwood

On 2011-9-14 23:35, Robert Bradshaw wrote:

... Otherwise, z.real, z.imag is probably going to
be as fast as you can get, and there's no need to define a function,
you could just write

sage: a = complex(3,4)
sage: x, y = a.real, a.imag


For trivial cases, yeah, but consider

parametric_plot((f(t-0.5j).real, f(t-0.5j).imag), (t,tmin,tmax))

parametric_plot(ReIm(f(t-0.5j)), (t,tmin,tmax))

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] complex parts

2011-09-14 Thread Anton Sherwood

Is there a function inverse to complex(x,y),
such that (x,y) == ReIm(complex(x,y)) ?

I could obviously write one -- def ReIm(z): return (z.real,z.imag) -- 
but presumably a library function if it exists would be speedier.


--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] cleaner?

2011-09-11 Thread Anton Sherwood

Whenever I shut down my computer, I find that

python ~/sage/local/bin/sage-cleaner

is still running.  Does it ever end?

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] noob q: working directory

2011-09-03 Thread Anton Sherwood

Thank you.  Curiosity is satisfied for now.

On 2011-9-03 14:17, Jason Grout wrote:

The graphic eventually would end up in your sage notebook, which would
be in ~/.sage/sage_notebook.sagenb/. The temporary directory the graphic
originally is in would be something like /tmp/something... You can do:

import os
print os.getcwd()

to see the temp directory for a particular cell.


--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] noob q: working directory

2011-09-03 Thread Anton Sherwood

In the tutorial:
Alternatively, evaluating c.save('filename.png')
will save the plot to the given file.

I tried it, then searched my disk for the relevant filename
with no result. Is it a bug? What directory ought it to be in?


Jason Grout wrote:

In the notebook, the graphic would be saved in a temporary directory
specific to that cell. The graphic would then be copied to a directory
inside the sage notebook directory tree. If you wanted to save it
somewhere specific from the notebook, use the full path:

c.save('/home/mydir/test.png')


Okay, that worked.  I'm still curious about the default, tho.
In MacOS might it be somewhere within
/Applications/Sage-4.7.1-OSX-64bit-10.6.app/ ?
or ~/Library/Application Support/ ?

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] noob q: working directory

2011-09-02 Thread Anton Sherwood
Hi everybody.

In the tutorial:
Alternatively, evaluating c.save('filename.png')
will save the plot to the given file.

I tried it, then searched my disk for the relevant filename
with no result.  Is it a bug?  What directory ought it to be in?
If I try to read in a file, what is the base directory?

...
Also: ARGH.  Google Groups won't let me register with my preferred
address (bro...@pobox.com).

-- 
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org