ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 14 Jul 2017 16:35:51 +0200I was trying to design random Latin Square. Could you please tell me why this code doesn't work?https://ask.sagemath.org/question/38260/i-was-trying-to-design-random-latin-square-could-you-please-tell-me-why-this-code-doesnt-work/Code:
import sys
from sage.all import *
def rand_LS(n):
m=LatinSquare(n)
m[0,0]=randint(0,n-1)
for i in range(0,n-1):
for j in range(0,n-1):
while true:
m[i,j]=randint(0,n-1)
if (m.is_completable()):
break
return mDawnFri, 14 Jul 2017 16:35:51 +0200https://ask.sagemath.org/question/38260/How to plot a colored graph from a latin square?https://ask.sagemath.org/question/31562/how-to-plot-a-colored-graph-from-a-latin-square/ The program will get input in form of a matrix that is a latin square.
This matrix will be dealt with as a blueprint for a complete graph, each cell of the matrix representing the color.
How can I plot such matrices?vicariousMon, 14 Dec 2015 20:08:13 +0100https://ask.sagemath.org/question/31562/