Ask Your Question

Revision history [back]

You can just call the sage method:

sage: a = r.rbinom(n=100,size=1,prob=0.25)
sage: a
  [1] 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0
 [48] 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1
 [95] 0 0 1 0 0 0
sage: L = a.sage()
sage: L

You In this case, you can just call the sage method:

sage: a = r.rbinom(n=100,size=1,prob=0.25)
sage: a
  [1] 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0
 [48] 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1
 [95] 0 0 1 0 0 0
sage: L = a.sage()
sage: L