File: display.cdb

package info (click to toggle)
cadabra2 2.4.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 78,796 kB
  • sloc: ansic: 133,450; cpp: 92,064; python: 1,530; javascript: 203; sh: 184; xml: 182; objc: 53; makefile: 51
file content (21 lines) | stat: -rw-r--r-- 412 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

def test01():
    __cdbkernel__ = create_scope()
    ex:= 3 A_{m n} B^{m n} + q(x) r s;
    tst=Ex(repr(ex))
    assert(tst==ex)
    print("Test 01 passed")

test01()

def test02():
    __cdbkernel__ = create_scope()
    \psia::LaTeXForm("\psi_{a}").
    \bar{#}::DiracBar.
    ex:= \bar{\psia};
    print(ex._latex_())
    assert(ex._latex_()==r"\bar{\psi_{a}}")
    print("Test 02 passed")

test02()