# Revision history [back]

### RandomLinearCode on non-prime fields fail ... sometimes.

Consider the following piece of code:

C=codes.RandomLinearCode(4,2,GF(16,'b'))
C.minimum_distance()


About half of the time, it fails with error

TypeError: unable to coerce from a finite field other than the prime subfield


I'd understand if SAGE could only compute the minimum distance for codes over primes fields, what has me confused is the fact that sometimes it can, sometimes it can't. Any clues as to what is going on here?

### RandomLinearCode Computing minimum_distance of a code on non-prime fields fail fails ... sometimes.

Consider the following piece of code:

C=codes.RandomLinearCode(4,2,GF(16,'b'))
C.minimum_distance()


About half of the time, it fails with error

TypeError: unable to coerce from a finite field other than the prime subfield


I'd understand if SAGE could only compute the minimum distance for codes over primes fields, what has me confused is the fact that sometimes it can, sometimes it can't. Any clues as to what is going on here?

 3 retagged vdelecroix 7357 ●17 ●81 ●163 http://www.labri.fr/pe...

### Computing minimum_distance of a code on non-prime fields fails ... sometimes.

Consider the following piece of code:

C=codes.RandomLinearCode(4,2,GF(16,'b'))
C.minimum_distance()


About half of the time, it fails with error

TypeError: unable to coerce from a finite field other than the prime subfield


I'd understand if SAGE could only compute the minimum distance for codes over primes fields, what has me confused is the fact that sometimes it can, sometimes it can't. Any clues as to what is going on here?

 4 retagged FrédéricC 4968 ●3 ●41 ●107

### Computing minimum_distance of a code on non-prime fields fails ... sometimes.

Consider the following piece of code:

C=codes.RandomLinearCode(4,2,GF(16,'b'))
C.minimum_distance()


About half of the time, it fails with error

TypeError: unable to coerce from a finite field other than the prime subfield


I'd understand if SAGE could only compute the minimum distance for codes over primes fields, what has me confused is the fact that sometimes it can, sometimes it can't. Any clues as to what is going on here?