Changeset 7409:dd3e113563fb
- Timestamp:
- 11/24/07 10:30:36 (5 years ago)
- Branch:
- default
- File:
-
- 1 edited
-
sage/combinat/combinat.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/combinat/combinat.py
r7408 r7409 211 211 def hadamard_matrix(n): 212 212 """ 213 Returns an nxn Hadamard matrix of order if the construction 214 is implemented in GUAVA. 213 Returns an n x n Hadamard matrix of order $n$, if possible. 214 215 If the construction of this matrix is not implemented in GUAVA or there is 216 no such matrix, raises a NotImplementedError. 215 217 216 218 EXAMPLES: … … 221 223 [ 1 -1 -1 1] 222 224 sage: hadamard_matrix(6) 223 Hadamard matrix of order 6 does not exist or is not implemented yet. 224 225 Traceback (most recent call last): 226 ... 227 NotImplementedError: Hadamard matrix of order 6 does not exist or is not implemented yet. 225 228 """ 226 229 try: 227 ans = gap("HadamardMat(%s)"%ZZ(n))228 return ans._matrix_(ZZ)230 ans = gap("HadamardMat(%s)"%ZZ(n)) 231 return ans._matrix_(ZZ) 229 232 except: 230 print "Hadamard matrix of order ",n," does not exist or is not implemented yet."233 raise NotImplementedError, "Hadamard matrix of order %s does not exist or is not implemented yet."%n 231 234 232 235 def bell_number(n):
Note: See TracChangeset
for help on using the changeset viewer.
