Skip to content

Commit 5c1a5c4

Browse files
committed
adding documentation
1 parent b63144d commit 5c1a5c4

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/flint/types/acb_mat.pyx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,10 +818,25 @@ cdef class acb_mat(flint_mat):
818818

819819
def theta(tau, z, square=False):
820820
r"""
821-
FIXME
821+
Computes the vector valued Riemann theta function `(\theta_{a,b}{z, tau) : a, b \in \{0,1\}^{g}\)` or its squares.
822+
This is a wrapper for the function `acb_theta_all` and it follows the same conventions for the ordering of the theta characteristics.
823+
824+
>>> from flint import acb, acb_mat, showgood
825+
>>> z = acb(1+1j); tau = acb(1.25+3j)
826+
>>> t0, t1, t2, t3 = acb_mat([[tau]]).theta(acb_mat([[z]]))
827+
>>> sum([abs(x) for x in acb_mat([z.modular_theta(tau)]) - acb_mat([[-t3,t2,t0,t1]])])
828+
[+/- 3.82e-14]
829+
>>> for i in range(4):showgood(lambda: acb_mat([[tau]]).theta(acb_mat([[z]]))[i], dps=25)
830+
...
831+
0.9694430387796704100046143 - 0.03055696120816803328582847j
832+
1.030556961196006476576271 + 0.03055696120816803328582847j
833+
-1.220790267576967690128359 - 1.827055516791154669091679j
834+
-1.820235910124989594900076 + 1.216251950154477951760042j
835+
>>> acb_mat([[1j,0],[0,2*1j]]).theta(acb_mat([[0],[0]]))
836+
([1.09049252082308 +/- 3.59e-15] + [+/- 2.43e-16]j, [1.08237710165638 +/- 4.15e-15] + [+/- 2.43e-16]j, [0.916991251621117 +/- 6.30e-16] + [+/- 2.43e-16]j, [0.910167024735558 +/- 7.93e-16] + [+/- 2.43e-16]j, [0.451696791791346 +/- 5.46e-16] + [+/- 2.43e-16]j, [+/- 2.43e-16] + [+/- 2.43e-16]j, [0.379830212998946 +/- 4.47e-16] + [+/- 2.43e-16]j, [+/- 2.43e-16] + [+/- 2.43e-16]j, [0.916991251621117 +/- 6.30e-16] + [+/- 2.43e-16]j, [0.910167024735558 +/- 7.93e-16] + [+/- 2.43e-16]j, [+/- 2.43e-16] + [+/- 2.43e-16]j, [+/- 2.43e-16] + [+/- 2.43e-16]j, [0.379830212998946 +/- 4.47e-16] + [+/- 2.43e-16]j, [+/- 2.43e-16] + [+/- 2.43e-16]j, [+/- 2.43e-16] + [+/- 2.43e-16]j, [+/- 2.43e-16] + [+/- 2.43e-16]j)
837+
822838
"""
823839
g = tau.nrows()
824-
assert g > 1
825840
assert tau.ncols() == g
826841
assert z.nrows() == g
827842
assert z.ncols() == 1

0 commit comments

Comments
 (0)